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

[rspec-users] running rspec complains about missing cucumber-rails

2010-02-16 Thread kat...@gmail.com
Hello, I can run cucumber tests, but when I run a rspec command (>ruby script \spec spec\views\category_metr ics\show.html.erb_spec.rb --backtrace), I am getting an error that the rails-cucumber gem is not found: no such file to load -- cucumber-rails C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custo

[rspec-users] adding to the callbacks that rspec-rails adds

2010-02-16 Thread Ben Fyvie
I have some code that adds to the callbacks that rspec-rails adds by default to http://github.com/dchelimsky/rspec-rails/blob/master/lib/spec/rails/in terop/testcase.rb">setup and teardown fixtures. My code looks something like: module Test module Unit class TestCase

[rspec-users] Looking for a new NullDB maintainer

2010-02-16 Thread Avdi Grimm
The time has come to turn NullDB maintenance over to someone new. See this post for details: http://avdi.org/devblog/2010/02/16/looking-for-a-new-nulldb-maintainer/ Please get in touch if you'd be interested in taking over maintenance for the NullDB project. Thanks! -- Avdi Home: http://avdi.o

[rspec-users] hash_include with regular expression

2010-02-16 Thread mikev
I'm trying to match a string in a hash passed to :find using a regular expression since I don't want to know all the other details of the :conditions passed to find. I've tried variations on the following with no success, e.g., not using hash_including and putting both hashes into a single hash_i