Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread Matt Wynne
On 4 Feb 2009, at 17:55, John Kolokotronis wrote: Why do you want before(:all)? Generally it's use is disregarded, just as global variables are considered harmful, not because they can't be used well, but because 99% of the times they aren't. Because I want to be able to create a single @b

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread Mark Wilden
On Wed, Feb 4, 2009 at 11:08 PM, Christopher Bailey wrote: > > My primary residual concern is that the DB isn't clean after the specs run, > which means it's not clean for the features/Cucumber run. > Fixtures? ///ark ___ rspec-users mailing list rspec

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread Christopher Bailey
Just normal Webrat, no Selenium, it's not installed, etc. I've now got things working, although I honestly have no idea what changed that makes it consistently run now. I did update to rspec and rspec-rails 1.1.12, but it still failed for a while after that. My primary residual concern is that th

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread Mike Gaffney
Are you running selenium or normal webrat (eg config.mode = :rails or config.mode = :selenium)? Christopher Bailey wrote: On Wed, Feb 4, 2009 at 12:54 PM, aslak hellesoy mailto:aslak.helle...@gmail.com>> wrote: On Wed, Feb 4, 2009 at 7:21 PM, Christopher Bailey mailto:ch...@cobaltedg

[rspec-users] [OT] Jay Fields' blog on developer testing

2009-02-04 Thread David Chelimsky
I highly recommend this blog post by Jay Fields: http://blog.jayfields.com/2009/02/thoughts-on-developer-testing.html Cheers, David ___ rspec-users mailing list rspec-users@rubyforge.org http://rubyforge.org/mailman/listinfo/rspec-users

Re: [rspec-users] MyModel.stub!l works in 1.1.11 but fails in 1.1.12

2009-02-04 Thread David Chelimsky
On Wed, Feb 4, 2009 at 7:42 PM, Brad wrote: > I have a controller spec that works find with Rails 2.2.2 and Rspec- > Rails 1.1.11. The code is: > > @activity=mock_model(Activity, :id => 7) > Activity.stub!(:get).with("7").and_return(@activity > > When I update to 1.1.12 > > ArgumentError in 'Ac

[rspec-users] MyModel.stub!l works in 1.1.11 but fails in 1.1.12

2009-02-04 Thread Brad
I have a controller spec that works find with Rails 2.2.2 and Rspec- Rails 1.1.11. The code is: @activity=mock_model(Activity, :id => 7) Activity.stub!(:get).with("7").and_return(@activity When I update to 1.1.12 ArgumentError in 'ActivitiesController' wrong number of arguments (2 for 1) F

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread Christopher Bailey
On Wed, Feb 4, 2009 at 12:54 PM, aslak hellesoy wrote: > On Wed, Feb 4, 2009 at 7:21 PM, Christopher Bailey > wrote: > > I've been battling the strangest behavior, and hoping someone can shed > some > > light... > > I am using RSpec for MVC tests, and then Cucumber for stories/features. > I > >

[rspec-users] Trouble validating an exception

2009-02-04 Thread Ben Greenberg
Hi all, This spec always passes: lambda do process_card @credit_card, billing_info, 10604, '1.1.1.1', @gateway end.should raise_error(MinimalCart::CaptureFailureError) do |ex| ex.should be_nil ex.should_not be_nil ex.responses.should be_nil ex.responses.shou

Re: [rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread aslak hellesoy
On Wed, Feb 4, 2009 at 7:21 PM, Christopher Bailey wrote: > I've been battling the strangest behavior, and hoping someone can shed some > light... > I am using RSpec for MVC tests, and then Cucumber for stories/features. I > am new to Cucumber, and recently finished converting our RSpec Story Run

Re: [rspec-users] have_tag with a block

2009-02-04 Thread s.ross
Hi-- On Feb 3, 2009, at 9:44 PM, MarkMT wrote: Thanks David. Those specs are very instructive. I have no idea what I was doing wrong before, but the behavior I'm seeing now is indeed consistent with the specs and matches what I had understood from the code I'd looked at (I suspect it'll stop wo

[rspec-users] Can cucumber/webrat set a value on a hidden field

2009-02-04 Thread Tom Hoen
I am using auto_complete to provide a list of persons from which the user can select one. On selection from the auto_complete list, a hidden field is updated with the id of the selected person. This is all wrapped in a form, that then can be submitted by the user (by clicking the provided submit bu

[rspec-users] Cucumber/Webrat fails to find fields when run after specs

2009-02-04 Thread Christopher Bailey
I've been battling the strangest behavior, and hoping someone can shed some light... I am using RSpec for MVC tests, and then Cucumber for stories/features. I am new to Cucumber, and recently finished converting our RSpec Story Runner suite to it. What I'm seeing is that if I clean the database (

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread John Kolokotronis
> Why do you want before(:all)?  Generally it's use is disregarded, just > as global variables are considered harmful, not because they can't be > used well, but because 99% of the times they aren't. Because I want to be able to create a single @browser object at the beginning of my tests and have

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread John Kolokotronis
Thanks for the reply David - much appreciated. At least now I know that it can't be done, rather than pursuing it further for now. I'll just have to live without that functionality for now and add it later on if a fix is made available. Regards, John On Feb 4, 2:03 pm, David Chelimsky wrote: >

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread Scott Taylor
John Kolokotronis wrote: Hi all, I'm new to Rspec but loving it so far and looking to use it as a replacement for a Test::Unit framework I have which drives a web app via Watir. So far, things have worked very well with Rspec but I can't get my head around how before/after(:all) blocks would wor

Re: [rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread David Chelimsky
On Wed, Feb 4, 2009 at 3:07 AM, John Kolokotronis wrote: > Hi all, > > I'm new to Rspec but loving it so far and looking to use it as a > replacement for a Test::Unit framework I have which drives a web app > via Watir. So far, things have worked very well with Rspec but I can't > get my head arou

[rspec-users] [Rspec] How do you nest before(:all) or after(:all) blocks?

2009-02-04 Thread John Kolokotronis
Hi all, I'm new to Rspec but loving it so far and looking to use it as a replacement for a Test::Unit framework I have which drives a web app via Watir. So far, things have worked very well with Rspec but I can't get my head around how before/after(:all) blocks would work in nested groups, or even