[Rspec-devel] Strange RSpec/Rails problem

Luke Redpath luke at agileevolved.com
Tue Aug 29 06:49:45 EDT 2006


NOTE: Please ignore the other version of this mail sitting in the  
moderation queue - I sent it with the wrong email address.

I'm in the process of writing an RSpec/Rails tutorial and I just  
created a new Rails project to test out my tutorial code. However,  
when I run the specs, I get the following strange error:

NoMethodError in 'A user (in general) should be invalid without a  
username'
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occured while evaluating nil.-
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ 
active_record/transactions.rb:112:in `unlock_mutex'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ 
active_record/fixtures.rb:534:in `teardown_with_fixtures'
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.4/lib/ 
active_record/fixtures.rb:556:in `teardown'
./spec/models/../spec_helper.rb:23:in `teardown'
/Users/luke/Sandbox/misc/rspec_tutorial/config/../vendor/plugins/ 
rspec/lib/rspec_on_rails.rb:103:in `run'	
I'm using RSpec 0.6.2 and the latest RSpec on Rails plugin with Rails  
1.1.6. Any ideas what could be causing this? I've also tried freezing  
to edge revision 4727.

Cheers
Luke


More information about the Rspec-devel mailing list