[rspec-users] subdomain based namespacing makes RSpec incorrectly state that the route doesn't exist

2011-06-11 Thread Daniel
www.example.com Failure/Error: get :index ActionController::RoutingError: No route matches {:controller=>"admin/pages"} $ rake routes ... admin_pages GET/pages(.:format) {:action=>"index", :controller=>"admin/pages"} ... Thank you for any help you can offer, Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] Sending raw JSON data with Rails 3.2.11 and RSpec

2013-02-08 Thread Daniel
I apologize if this message was sent more than once, I tried to post through the Google Groups page but it didn't seem to work. In order to ensure that my application is not vulnerable to this exploit, I am trying to create a controller test in RSpec to cover it. In order to do so, I need to be ab

[rspec-users] Rspec - Creation of stories

2009-12-03 Thread Daniel Varrin
er? There is a whole folder of examples with version 1.2.9, but none of them is an example about how to create a story or scenario. Am I missing an other lib for stories? I hope you can help me. Best regards, Daniel Varrin ___ rspec-users mailing list r

[rspec-users] Issue when run my specs in Textmate but not in terminal

2010-06-21 Thread Daniel Lopes
Hello, I'm experiencing a weird behavior that I cant find the solution. My specs that depends on Factory Girl with attachment only works in command line and not in Textmate with Command+R or Command +Shift+R. My app uses rspec 1.3, rspec-rails 1.3.2, factory-girl 1.2.4 and Rails 2.3.5 with papercl

Re: [rspec-users] Issue when run my specs in Textmate but not in terminal

2010-06-24 Thread Daniel Lopes
Fixed, the problem was the path of my textmate. The solution is open preferences, go to advanced/shell variables and make sure that your PATH entry includes the path of your imagemagick (in my casa, with homebrew is /usr/local/bin). On Jun 22, 2:05 am, Daniel Lopes wrote: > Hello,

[rspec-users] Problem with spec_helper

2010-08-26 Thread Daniel Lidström
d be successful" do get 'contact' response.should be_success end end end $ rake --trace spec (in /home/daniel/programming/rails_projects/sample_app) ** Invoke spec (first_time) ** Invoke db:test:prepare (first_time) ** Invoke db:abort_if_pendi

Re: [rspec-users] Problem with spec_helper

2010-08-26 Thread Daniel Lidström
On 26 Aug, 15:25, Brennon Bortz wrote: > Would not having run "rails generate rspec:install" cause this problem? > > On 26 Aug 2010, at 14:21, David Chelimsky wrote: > > > On Aug 22, 2010, at 2:10 PM, Daniel Lidström wrote: > > >> > >> So it se

[rspec-users] stack level too deep

2010-08-27 Thread Daniel Lidström
Hello, I am trying to run my first integration tests of my rails 3 application. All tests fail with an error "stack level too deep". The tests are intended to verify the link routes and look like this: dan...@ubuntu/home/daniel/programming/rails_projects/sample_app$ cat spe

Re: [rspec-users] stack level too deep

2010-08-28 Thread Daniel Lidström
is correct or what to do next. I tried "bundle install" and then "rspec spec/requests". Capybara was installed but I still got the stack level too deep error. Could you tell me what to do or point me to an online resource where this is documented? Than

Re: [rspec-users] stack level too deep

2010-08-28 Thread Daniel Lidström
capybara. Thanks for the responses so far. Here's what I have done: - Switched to beta 20: dan...@ubuntu/home/daniel/programming/rails_projects/sample_app$ cat Gemfile source 'http://rubygems.org' gem 'rails', '3.0.0.rc' # Bundle edge Rails instead: # gem 

Re: [rspec-users] stack level too deep

2010-08-28 Thread Daniel Lidström
On 28 Aug, 21:21, Toni Tuominen wrote: > Have selector is a webrat matcher. If you're not using webrat you > can't use it. Capybara's matcher is have_css. I suggest you take a > look at capybara docs. > > - Toni Aha, that makes perfe

[rspec-users] render_template failure

2010-09-04 Thread Daniel Lidström
with => "foobar" click_button "Sign up" page.should have_css("div.flash.success", :text => "Welcome") response.should render_template("user/show") end.should change(User, :count).by(1) end end end Th

Re: [rspec-users] render_template failure

2010-09-04 Thread Daniel Lidström
On Sep 4, 8:41 pm, Daniel Lidström wrote: >           response.should render_template("user/show") I noticed a mistake on the above line. However, the correct line (with "users/show") also fails: dan...@ubuntu /home/daniel/programming/bowling (signing-up) $ ls app/ vi

[rspec-users] rspec error's when checking LayoutLinks from the railstutorials

2010-10-21 Thread Daniel Palacio
I am following the rails tutorial: http://railstutorial.org/chapters/filling-in-the-layout#top Basically the test is something like: spec/requests/layout_links_spec.rb require 'spec_helper' describe "LayoutLinks" do it "should have a Home page at '/'" do get '/' response.should have_s

[rspec-users] How to specify current directory for specs?

2010-11-09 Thread Daniel Lidström
: desc "Run all specs in the spec directory" RSpec::Core::RakeTask.new('spec') do |t| t.rspec_opts = %w[--color] end Can I specify the spec/ directory as the current directory when running this task? What is the expert recommendation? Is the d

Re: [rspec-users] How to specify current directory for specs?

2010-11-10 Thread Daniel Lidström
ry for the confusion. Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] How to specify current directory for specs?

2010-11-12 Thread Daniel Lidström
On 10 Nov, 22:50, Rhett Sutphin wrote: > Hi Daniel, > [...] > As an alternative, you might also consider having a helper like this: > > # again, in spec/spec_helper.rb > def spec_path(path) >   File.expand_path("../spec", __FILE__) > end > > which yo

[rspec-users] Rspec & Rails Nested Resources

2010-12-14 Thread Daniel C.
Hey all, I'm new to Rspec and I was just wondering what the standard way of testing nested resources is? I currently have a Job model which has many Correspondences. The new action of my CorrespondencesController looks like: def new @job = Job.find params[:job_id] @correspondence = @j

Re: [rspec-users] Rspec & Rails Nested Resources

2010-12-19 Thread Daniel C.
Thanks for your response Pat - I ended up taking the stub_chain method which got it working. For anyone interested this is my new test: it "GET new" do @correspondence = mock_model(Correspondence) @job.stub_chain(:correspondences, :build).and_return(@correspondence) get :new

[rspec-users] installing RSpec requires changing generators in config/applicaton.rb?

2011-03-05 Thread Daniel Kehoe
there a recent improvement that eliminates the need to set up rspec in config.generators? Or am I missing something? I'm using Rails 3.0.5 and rspec-rails 2.5. -- Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] New, clueless, confused.and thinking JQuery+MongoID is breaking my template code examples.

2011-04-25 Thread Daniel Kehoe
e tutorial: https://github.com/fortuity/rails3-mongoid-devise/wiki/Tutorial-(Walkthrough) Hopefully you got it all figured out by now, but if you still need help, take a look at the tutorial. -- Daniel -- Posted via http://www.ruby-forum.com/. ___ r

Re: [rspec-users] warning: toplevel constant XYZ referenced Admin:XYZ

2012-01-07 Thread Daniel D.
Someone made some sense out of this. http://code.dblock.org/warning-toplevel-constant-xyz-referenced-adminxyz -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-u

Re: [rspec-users] Sending raw JSON data with Rails 3.2.11 and RSpec

2013-02-08 Thread Daniel Vandersluis
Hi Lawrence, thanks for the response. Unfortunately, when I try that, I get: NoMethodError: undefined method `symbolize_keys' for > "{\"api_token\":0}":String > /Users/daniel/.rvm/gems/ruby-1.9.3-327/gems/actionpack-3.2.11/lib/action_controller/test_case.rb:

Re: [rspec-users] Sending raw JSON data with Rails 3.2.11 and RSpec

2013-02-08 Thread Daniel Vandersluis
Sorry, I just realized you did this as a request spec, not as a controller spec! That's what I was missing here, thanks! So is it not possible to do a controller spec with raw data? On Friday, February 8, 2013 4:01:43 PM UTC-5, lawrence.pit wrote: > > Hi Daniel, > > >

[rspec-users] How can I find out which specs are being run programmatically?

2013-07-02 Thread Daniel Doubrovkine
I have a step that precompiles assets before specs are run. I don't need assets for spec groups other than views and integration. Is there a way to programmatically examine the list of files or specs (groups?) being run within a Spork.each_run or an RSpec before(:all) block? Thx dB. -- dB. | Mo

[rspec-users] Testing Rails Associations

2007-07-03 Thread Daniel N
he model rather than it's behaviour. The behaviour is to call @ article.comments and have an array of comments returned. Any thoughts? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

[rspec-users] mocking methods in the controller.

2007-07-05 Thread Daniel N
way that I can define this so that my views will be executed? Will this same thing occur for all helper methods that are definied in the controller? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec so please be patient with me. > > I've tried to take some of my tests out of the controller specs to check for > things th

Re: [rspec-users] Testing Rails Associations

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/3/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I'm very new to rspec, so if this is not the right forum please let me > know. > > I'm starting to spec my models first in an existing rails

Re: [rspec-users] Testing Rails Associations

2007-07-06 Thread Daniel N
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/3/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > > > I'm very new to rspec, so if this is not th

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/5/07, Daniel N <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm very new to rspec so please be patient with me. > > > > I&#x

Re: [rspec-users] mocking methods in the controller.

2007-07-06 Thread Daniel N
On 7/6/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > On 7/6/07, Daniel N <[EMAIL PROTECTED]> wrote: > > On 7/6/07, David Chelimsky < [EMAIL PROTECTED]> wrote: > > > On 7/5/07, Daniel N <[EMAIL PROTE

[rspec-users] Is it bad to use a shared example in rspec_helper.rb?

2007-07-09 Thread Daniel N
I want to extract the method for logging in so that I don't have to include it in each before call. Is it bad to use a describe block within the rspec_helper in a rails project for controller tests? I have in my spec_helper.rb describe "an authenticated request", :shared => true do before( :ea

[rspec-users] Mocking User.find( :all, :limit => 10 )

2007-07-09 Thread Daniel N
mocks with options passed to them? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mocking User.find( :all, :limit => 10 )

2007-07-09 Thread Daniel N
My Bad... Please ignore On 7/10/07, Daniel N <[EMAIL PROTECTED]> wrote: Hi, I'm trying to setup a mock for my controller test but I can't get it to recognise the mock. I use it "should find all users" do User.should_receive(:find).with( :all, :limit => 10

[rspec-users] Agh, this is annoying. Why is this happening?

2007-07-12 Thread Fischer, Daniel
My problem: Mock 'Task_1005' received unexpected message :user_id= with (1) No matter what I do to try to stub that out it will still fail out and give me that message. Here is my spec describe TasksController, "handling POST /tasks" do before(:each) do @task = mock_model(Task, :to_param

[rspec-users] Specing Layouts

2007-07-14 Thread Daniel N
Hi, I've just started to try and spec my application.html.erb layout as one of the view specs but it totally barfs. I'm guessing that it's due to the yield statements in the layout. Any clues as to how to proceed? Cheers Daniel

Re: [rspec-users] Specing Layouts

2007-07-14 Thread Daniel N
On 7/15/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/14/07, Daniel N <[EMAIL PROTECTED]> wrote: > Hi, > > I've just started to try and spec my application.html.erb layout as one of > the view specs but it totally barfs. > > I'm guessing that it

Re: [rspec-users] Specing Layouts

2007-07-15 Thread Daniel N
On 7/15/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/14/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > On 7/15/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/14/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > &

Re: [rspec-users] Specing Layouts

2007-07-15 Thread Daniel N
On 7/16/07, Daniel N <[EMAIL PROTECTED]> wrote: On 7/15/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/14/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > > > On 7/15/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > O

Re: [rspec-users] Specing Layouts

2007-07-15 Thread Daniel N
On 7/16/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/15/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/16/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > > > > > > > On 7/15/07, David Chelimsky < [EMAIL PROTECTE

Re: [rspec-users] Getting past my login system

2007-07-16 Thread Daniel N
ntroller and so it's not found. If it's the presence of the session[:user] that tells the before_filter that your logged in, the you don't need to do the post. In fact you shouldn't post, since as you found out if you post to login, your posting to the login action of the controll

Re: [rspec-users] Getting past my login system

2007-07-16 Thread Daniel N
On 7/17/07, Ryan Tucker <[EMAIL PROTECTED]> wrote: Daniel N wrote: > > > On 7/17/07, *Ryan Tucker* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Ryan Tucker wrote: > > Thank you in advance for your help. I am relatively new to b

Re: [rspec-users] Getting past my login system

2007-07-16 Thread Daniel N
On 7/17/07, Ryan Tucker <[EMAIL PROTECTED]> wrote: Daniel N wrote: > > > On 7/17/07, *Ryan Tucker* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Daniel N wrote: > > > > > > On 7/17/07, *Ryan Tuc

Re: [rspec-users] Getting past my login system

2007-07-16 Thread Daniel N
On 7/17/07, Ryan Tucker <[EMAIL PROTECTED]> wrote: Daniel N wrote: > > > On 7/17/07, *Ryan Tucker* <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > Daniel N wrote: > > > > > > On 7/17/07, *Ryan Tuc

Re: [rspec-users] need help getting a word right

2007-07-18 Thread Daniel N
On 7/19/07, David Chelimsky <[EMAIL PROTECTED]> wrote: Hey all, I see examples showing up that look like this: describe Thing do before(:each) do @thing = Thing.new end it do @thing.should be_something end end This will produce output like this: Thing - should be something

Re: [rspec-users] Running RSpec from within my Ruby application

2008-09-27 Thread Daniel Lucraft
oups) # clear up formatter rspec_options.instance_variable_set(:@o, nil) # system is now clean (?), and ready to reload specs etc As you can probably tell, I'm coding without really understanding. This works well enough for my needs right now, but please let me know how these thi

Re: [rspec-users] Running RSpec from within my Ruby application

2008-09-28 Thread Daniel Lucraft
--- Scott Taylor <[EMAIL PROTECTED]> wrote: > I'm missing the why. What is the higher-level objective that you're > trying to accomplish? Seems like you want something like autotest + a > custom formatter? The app (www.redcaride.com) has a plugin system with reloading, which lets you wor

[rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
Is it possible to use spec fixtures with Cucumber, and if so, how? Thanks, Daniel Higginbotham -- Posted via http://www.ruby-forum.com/. ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
aslak hellesoy wrote: > On Wed, Oct 8, 2008 at 3:16 PM, Daniel Higginbotham > <[EMAIL PROTECTED]> wrote: >> Is it possible to use spec fixtures with Cucumber, and if so, how? >> > > Google for cucumber fixtures > > http://www.ruby-forum.com/topic/165215 >

Re: [rspec-users] cucumber and fixtures

2008-10-08 Thread Daniel Higginbotham
x27;d actually like to be able to use the fixtures in spec/fixtures , just as I can for plain old specs. With specs, you can define which fixtures to use in each "describe" block, using something like describe TodoList do fixtures :todo_lists, :todos, :users it "should return an

Re: [rspec-users] cucumber and fixtures

2008-10-09 Thread Daniel Higginbotham
Pat Maddox wrote: > Daniel Higginbotham <[EMAIL PROTECTED]> writes: > >>> ActiveRecord::Schema.verbose = false >>> { :name => "blah", :id => 1 }, >> >> end >> end >> >> Are you similarly able to load your

[rspec-users] problem to mock association proxy

2008-12-05 Thread Daniel Lopes
spec/controllers/properties_controller_spec.rb:21: So, how is the right way to mock associated records? Thanks. Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.area

Re: [rspec-users] proxy associantion on controllers

2008-12-05 Thread Daniel Lopes
ned method `stub' for # Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.areacriacoes.com.br/projects http://blog.areacriacoes.com.br/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 55 (31) 3077-4560 / 55

Re: [rspec-users] proxy associantion on controllers

2008-12-05 Thread Daniel Lopes
"should expose all properties of given user as @properties" do @user.should_receive(:properties).and_return([mock_property]) get :index assigns[:properties].should == [mock_property] end end thanks. Atenciosamente, Daniel Lopes  Area Criaçõe

Re: [rspec-users] proxy associantion on controllers

2008-12-05 Thread Daniel Lopes
Ashley Moran gave me help in another post that I open by accident when entries in the group, and now spec passed... But I still would like to understand more about mocks and stubs that I asked in previous email. Thanks again and sorry many emails. Atenciosamente, Daniel Lopes  Area Criações

Re: [rspec-users] Where to start after writing feature

2008-12-05 Thread Daniel Lopes
I think is better create the step ( it will no work ) and then run script/generate rspec_scaffold Task name:string description:text cas_link:string or if you not using rspec: script/generate scaffold Task name:string description:text cas_link:string Atenciosamente, Daniel Lopes  Area

Re: [rspec-users] proxy associantion on controllers

2008-12-05 Thread Daniel Lopes
y] end end And my controller code where error refer is: private def load_user @user = User.find(params[:user_id]) if @user.nil? flash[:notice] = "Registro não encontrado" redirect_to root_path end end Atenciosamente, Daniel Lopes  Area Cria

[rspec-users] Problem when testing controllers

2008-12-12 Thread Daniel Lopes
:create_from_user) put :update, :id => "1" assigns(:property).should equal(@property) end But get this error: The error occurred while evaluating nil.[] The problem is params and I don't know how is the best way to simulete params hash ... Anyone can help? Tha

[rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
elo Horizonte cep: 30566500 area: 150m constructed_area: 120m category: galpão usage: comercial owner_code: AS341ADV garage: 2 description: Casa com 3 quartos observation: condominium_value: 0 iptu_value: 90.50 Atenciosamente, Daniel Lopes  Area Criações Desig

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
#["is not valid"]}, @base=#, created_at: nil, updated_at: nil, contact_email: "te...@hosttest.com">> Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.areacriacoes.com.br/projects

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
on my fixtures files? I think I don't get the message yet in other model spec because this is the fist model that use properties.yml ( in properties_spec I only use fixtures for users ) Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
eate_tenant end it "should create a new instance given valid attributes" do p properties(:two).errors properties(:two).should be_valid # @tenant.errors.should be_empty end end Atenciosamente, Daniel Lopes  Area Criações Design, Websites

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
properties(:two).valid? p properties(:two).errors # @tenant.errors.should be_empty end And my fixtures still the same... I don't know what's happening, when I try run on console or in browser everything ok... I think is something strange with fixtures. Atenciosa

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
operty raise an error. And if I mock model on model spec will not be a good thing. Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.areacriacoes.com.br/projects http://blog.area

Re: [rspec-users] fixtures and associations

2008-12-17 Thread Daniel Lopes
7-7501 On Thu, Dec 18, 2008 at 12:10 AM, aslak hellesoy wrote: > > > On Thu, Dec 18, 2008 at 2:02 AM, Daniel Lopes wrote: > >> I know... I just don't use create!, in this special case, because it will >> be more complicate to know what field have the error . >> &

Re: [rspec-users] fixtures and associations

2008-12-18 Thread Daniel Lopes
ink to any project on github that use factory-girl and rspec ? Thanks for all help. Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.areacriacoes.com.br/projects http://blog.areacriac

Re: [rspec-users] fixtures and associations

2008-12-18 Thread Daniel Lopes
ed id in my yml files everything works. Crazy. I'm still want to migrate to factory-girl, if anybody has material or links on github about projects using rspec and factory-girl will help alot. Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Vis

Re: [rspec-users] fixtures and associations

2008-12-18 Thread Daniel Lopes
Thanks everybody... Atenciosamente, Daniel Lopes  Area Criações Design, Websites e Sistemas Web Visite: http://www.areacriacoes.com.br/projects http://blog.areacriacoes.com.br/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 55 (31) 3077-4560 / 55

[rspec-users] [Cucumber, Merb, Webrat] undefined method 'response' for Merb::Test::World::Webrat

2009-01-20 Thread Daniel Vartanov
Hello! I get the following error everytime I try to check the result of previous step (by the way, I use default result_steps.rb): undefined local variable or method `response' for # (NameError) ./features/steps/result_steps.rb:14:in ` /^the (.*) ?request should fail/' features/authentication/logi

[rspec-users] before(:all) and nested contexts

2009-07-09 Thread Daniel Tenner
'm quite happy to give up the ability to have before blocks in the sub-contexts in order to ensure that the expensive operation is only run once... Your thoughts most welcome... (including, perhaps, telling me that I'm Doing It Wrong) Daniel Tenner http://www.woobius.com http://danielten

Re: [rspec-users] before(:all) and nested contexts

2009-07-09 Thread Daniel Tenner
To answer myself, I've put together the following work-around: http://www.swombat.com/getting-rspec-beforeall-and-nested-contexts-w Still, would love to know if there was a better, less hackish way to do it. Daniel On Thu, Jul 9, 2009 at 11:40 AM, Daniel Tenner wrote: > Hi all, > Li

Re: [rspec-users] before(:all) and nested contexts

2009-07-09 Thread Daniel Tenner
like a great way to do it, but I understand why you'd want to get the refactoring out of the way first. With my temporary hack in place, I can wait. Thanks, Daniel On Thu, Jul 9, 2009 at 3:22 PM, Zach Moazeni wrote: > > Rereading your original email, I'm thinking I may not have en

[rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Daniel N
ping.create( :clip => clip, :book => ) clipping.should_not be_valid end.should_not change( Clipping, :count ) end Any hints as to how to do this without using fixtures? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Daniel N
On 7/24/07, Ashley Moran <[EMAIL PROTECTED]> wrote: On 24 Jul 2007, at 14:07, Daniel N wrote: > Any hints as to how to do this without using fixtures? I did this literally minutes ago. I don't use fixtures at all, ever. Instead I put the data in the before block, eg: des

[rspec-users] Possible Bug

2007-07-24 Thread Daniel N
_with_privacy?( model.clip ) model.errors.add( :clip, "You can't add this item to this book" ) end end end ... end Any thoughts on what might be causing that? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Daniel N
On 7/24/07, Daniel N <[EMAIL PROTECTED]> wrote: On 7/24/07, Ashley Moran <[EMAIL PROTECTED]> wrote: > > > On 24 Jul 2007, at 14:07, Daniel N wrote: > > > Any hints as to how to do this without using fixtures? > > I did this literally minutes ago. I don

Re: [rspec-users] Possible Bug

2007-07-24 Thread Daniel N
On 7/25/07, Daniel N <[EMAIL PROTECTED]> wrote: I'm trying to test some code that has validates each and I've got a very strange failure Mock 'Book_1027' expected :store_with_privacy? with (#) but received it with (#) The Spec it "should check that a boo

Re: [rspec-users] Possible Bug

2007-07-24 Thread Daniel N
On 7/25/07, David Chelimsky <[EMAIL PROTECTED]> wrote: On 7/24/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > On 7/25/07, Daniel N <[EMAIL PROTECTED]> wrote: > > I'm trying to test some code that has validates each and I've got a very > str

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Daniel N
association rules and then this can be checked and kept track of when you are refactoring or changing code. Hope that helps. Regards Mikel Thanx Mikel. I didn't even think of using a uniq on the has_many. I was using a validates_uniquness_of :scope => 'book_id' I will def

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-24 Thread Daniel N
On 7/25/07, Kyle Hargraves <[EMAIL PROTECTED]> wrote: Daniel N wrote: > On 7/25/07, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: >> >> There would be a different way. >> >> In the idea of "Only test the code you write" all you really need to &

Re: [rspec-users] Mock or Stub strategy for validates_uniqueness_of

2007-07-25 Thread Daniel N
On 7/25/07, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: Kyle, That is a good point. We are after the behaviour, not the implementation. Regards Mikel On 7/25/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/25/07, Kyle Hargraves <[EMAIL PROTECTED]> wrote:

[rspec-users] specing a call to render :layout => "some_layout"

2007-07-28 Thread Daniel N
"}) but received it with (no > args) > I'd really like to understand why this isn't working, but I don't really like it anyway. I mean, I really want to spec that under a particular set of conditions it renders with a given layout. I can't imagine I

Re: [rspec-users] specing a call to render :layout => "some_layout"

2007-07-28 Thread Daniel N
On 7/28/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/28/07, Daniel N <[EMAIL PROTECTED]> wrote: > > I'm trying to specify that an action should be rendered with a given > layout > > one particular spec. > > > > What I've got at t

Re: [rspec-users] View-Driven-Development by Behavior-Driven-Development and RSpec

2007-07-30 Thread Daniel N
all that is setup. What would be fantastic is if mock had an option to report calls to non-existent methods. Something like mock( User, :report_pending_methods => :true ) Is there another way to do this that is already in practice? Cheers Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] View-Driven-Development by Behavior-Driven-Development and RSpec

2007-07-30 Thread Daniel N
On 7/30/07, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > > I find myself doing the same thing... the, open the model and type in > the it shoulds... I think it would need to do a bit more. If I call mock_model( User ) and the User class doesn't exist yet that will blow it up. I guess at that poi

Re: [rspec-users] View-Driven-Development by Behavior-Driven-Development and RSpec

2007-07-30 Thread Daniel N
ed to be defined. This seems to be the spec for Thing, but if in a view I said it "should do_stuff if @thing is alive" do @thing = mock_model( Thing ) @thing.stub!( :alive? ).and_return( true ) controller.should_receive( :do_stuff ) do_get end How do I run the view first without Thing, and also keep track of alive? being decalred on the Thing instance? -Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] View-Driven-Development by Behavior-Driven-Development and RSpec

2007-07-30 Thread Daniel N
On 7/30/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/30/07, Daniel N <[EMAIL PROTECTED]> wrote: > > On 7/30/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > On 7/30/07, Mikel Lindsaar <[EMAIL PROTECTED]> wrote: > > > > I fi

Re: [rspec-users] View-Driven-Development by Behavior-Driven-Development and RSpec

2007-07-30 Thread Daniel N
On 7/30/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/30/07, Daniel N <[EMAIL PROTECTED]> wrote: > > On 7/30/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > > On 7/30/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > On 7/30/07,

Re: [rspec-users] Unimplemented Spec idea

2007-07-31 Thread Daniel N
ould do stuff" do pending( "Don't run this yet" ) # specs go here for unimplemented feature end HTH Daniel ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] Unimplemented Spec idea

2007-07-31 Thread Daniel N
On 8/1/07, David Chelimsky <[EMAIL PROTECTED]> wrote: > > On 7/31/07, Daniel N <[EMAIL PROTECTED]> wrote: > > > > > > On 8/1/07, Scott Taylor <[EMAIL PROTECTED]> wrote: > > > > > > I absolutely love the unimplemented spec idea, and ten

[rspec-users] Plugins 'speced' with rSpec?

2007-08-03 Thread Fischer, Daniel
Hello, I'm trying to figure out how to setup a spec structure for plugins. I'm getting pretty lost in figuring out how to isolate a plugin enviornment emulating rails, but not actually being reflected upon the current rails project. What I mean is this, let's say I have a comment plugin. This has

[rspec-users] Can't seem to spec a ActiveRecord::RecordInvalid exception properly...

2007-08-08 Thread Fischer, Daniel
1 def create 2 @user = User.new(params[:user]) 3 @user.save! 4 self.current_user = @user 5 redirect_to user_path(@user) 6 flash[:notice] = "Thanks for signing up!" 7 rescue ActiveRecord::RecordInvalid 8 render :action => 'new' 9 end I can't seem to properly s

Re: [rspec-users] Can't seem to spec a ActiveRecord::RecordInvalid exception properly...

2007-08-08 Thread Fischer, Daniel
It's redirecting to /users/1 so it's not causing a fail on the exception, which I don't know why. My question is how to properly do this in rSpec? On 8/8/07, Lance Carlson <[EMAIL PROTECTED]> wrote: > > Does it redirect instead? > > On 8/8/07, Fischer, Daniel

Re: [rspec-users] Any liberally-licensed open source projects out there that make good use of RSpec?

2007-08-08 Thread Daniel N
users@rubyforge.org > > > http://rubyforge.org/mailman/listinfo/rspec-users > > > > ___ > > rspec-users mailing list > > rspec-users@rubyforge.org > > http://rubyforge.org/mailman/listinfo/rspec-users > > >

Re: [rspec-users] controller spec with model that validates_uniqueness

2007-08-23 Thread Daniel N
gt; 13554} could become. @category = mock_model( Category, :id => 1 ) # Not sure where this one is used other than the call to put @image = mock_model( Image, :id => 2 ) @image.should_receive( :save! ).once.with( :any_args ).and_return( true ) Image.stub!( :find ).and_return( @image ) p

Re: [rspec-users] changes to TextMate bundle

2007-09-10 Thread Fischer, Daniel
Please let us know when it's updated :) On 9/10/07, Bryan Liles <[EMAIL PROTECTED]> wrote: > > > On Sep 8, 2007, at 5:59 PM, David Chelimsky wrote: > > > Hi all, I got some help from James Edward Gray II on the RSpec > > TextMate bundle. For those of you who don't know James, he runs the > > Ruby

Re: [rspec-users] changes to TextMate bundle

2007-09-11 Thread Fischer, Daniel
So is it just me, or is the new rspec bundle not working as intended when using the "run" shortcuts? shift + cmd + r doesn't work. (brings up ruby execution) cmd + r doesn't work. (brings up ruby execution) and option + cmd + r brings up a filter dialog They do work if I select it manually throug

Re: [rspec-users] changes to TextMate bundle

2007-09-11 Thread Fischer, Daniel
Okay, I've never "selected" a bundle before. Shouldn't the bundle automatically parse the document to see if it matches that bundle? for e.ghaving "spec" in the file name? What extra steps am I missing? On 9/11/07, David Chelimsky <[EMAIL PROTECTED]> wrote: >

[rspec-users] I can't make RSpec 1.0.8 run in Rails 1.2.3

2007-10-05 Thread Daniel Mantilla
ortClass was already created on app/models. When I add the following line at the top of the file it complains about ActiveRecord (uninitialized constant) require File.dirname(__FILE__) + '/../app/models/report_class' Thanks in advance, Daniel Be smarter than spam. See how sma

  1   2   >