Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-17 Thread David Chelimsky
On Wed, Feb 17, 2010 at 12:24 PM, patrick99e99 wrote: >> That's likely because cucumber is generating a rerun.txt file and >> autotest is picking that up for some reason. > > Ah..  I do see that in my project directory there is a rerun.txt > file...  How did that get created, and is the solution j

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-17 Thread patrick99e99
> That's likely because cucumber is generating a rerun.txt file and > autotest is picking that up for some reason. Ah.. I do see that in my project directory there is a rerun.txt file... How did that get created, and is the solution just to delete it? -patrick __

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-17 Thread Andrei Erdoss
I also get the infinite looping of the cucumber features being run. The way I stopped it is by adding this: Autotest.add_hook :initialize do |at| %w{.svn .hg .git vendor rerun.txt}.each {|exception| at.add_exception(exception) } end to ~/.autotest Is there a better to do this? On Wed,

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-17 Thread David Chelimsky
On Tue, Feb 16, 2010 at 10:24 PM, patrick99e99 wrote: >> What command are you running? > > I have just been doing script/autospec > > ..  I actually posted on the rspecbook forum (haven't heard anything > yet, so I'll ask here) regarding autospec..  When I ran it, it told me > that features were b

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
> What command are you running? I have just been doing script/autospec .. I actually posted on the rspecbook forum (haven't heard anything yet, so I'll ask here) regarding autospec.. When I ran it, it told me that features were being skipped unless I supplied an environment variable AUTOFEATURE

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread David Chelimsky
On Tue, Feb 16, 2010 at 8:55 PM, patrick99e99 wrote: >> This suggests that you're mixing versions of rspec and rspec-rails >> that are incompatible. What versions are you using, and do you have >> any installed in vendor/plugins in addition to vendor/gems? > > Well, I did run rake gems:unpack:depe

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
> This suggests that you're mixing versions of rspec and rspec-rails > that are incompatible. What versions are you using, and do you have > any installed in vendor/plugins in addition to vendor/gems? Well, I did run rake gems:unpack:dependencies, which I believe is what the rspec book had said to

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread David Chelimsky
On Tue, Feb 16, 2010 at 8:27 PM, patrick99e99 wrote: > Hi again, > >> user = User.create(@invalid_attributes) >> user.should_not be_valid > > This gives me: > > NoMethodError in 'User should fail when passwords do not match' > undefined method `handling_predicate!' for # 0x104d8a518 @args=[:be_val

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
Hi again, > user = User.create(@invalid_attributes) > user.should_not be_valid This gives me: NoMethodError in 'User should fail when passwords do not match' undefined method `handling_predicate!' for # > Try raise_error instead of raise_exception. If that works, you're > using an older version

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread David Chelimsky
On Tue, Feb 16, 2010 at 8:02 PM, patrick99e99 wrote: > Hi, > >> User.create(@invalid_attributes).should be_false # using create >> instead of create! > > Hmmm..  when I tried this, I get: Oops - it's this: user = User.create(@invalid_attributes) user.should_not be_valid > > 'User should fail wh

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
Hi, > The create! method is designed to raise an error if validation fails. > You can get this to work in one of two ways: > > User.create(@invalid_attributes).should be_false # using create > instead of create! Hmm, when I try that-- It still doesn't work... it "should fail when passwords do

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
Hi, > User.create(@invalid_attributes).should be_false # using create > instead of create! Hmmm.. when I tried this, I get: 'User should fail when passwords do not match' FAILED expected # to be false > expect do > User.create!(@invalid_attributes) > end.to raise_exception(ActiveRecord::Reco

Re: [rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread David Chelimsky
On Tue, Feb 16, 2010 at 5:42 PM, patrick99e99 wrote: > I am new to BDD, so am not quite sure how I am supposed to write a > test like this..  I get: > "ActiveRecord::RecordInvalid in 'User should fail when passwords do > not match' > Validation failed: Password doesn't match confirmation" > > If a

[rspec-users] Trying to write a failing test-- but am failing!

2010-02-16 Thread patrick99e99
I am new to BDD, so am not quite sure how I am supposed to write a test like this.. I get: "ActiveRecord::RecordInvalid in 'User should fail when passwords do not match' Validation failed: Password doesn't match confirmation" If anyone can guide me in the right direction, I'd appreciate it.. -pa