I setup a testing model in my Depot web app from the Agile Web
Development with Rails book and came up with the following errors:
Loaded suite test/unit/product_test
Started
EE
Finished in 0.050279 seconds.
-
Error:
test_create(ProductTest):
Errno::ENOENT: No such file or directory -
/Users/Mike/Sites/depot/config/…/test/fixtures/categories
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:327:in
open' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:327:in
read_fixture_files’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:279:in
initialize' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:251:in
create_fixtures’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:250:in
create_fixtures' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/base.rb:794:in
silence’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:248:in
create_fixtures' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:565:in
load_fixtures’
/usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:512:in
setup_with_fixtures' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:547:in
setup’ -
Error:
test_create(ProductTest):
NoMethodError: 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.2/lib/active_record/transactions.rb:112:in
unlock_mutex' /usr/local/lib/ruby/gems/1.8/gems/activerecord-1.14.2/lib/active_record/fixtures.rb:534:in
teardown’
1 tests, 0 assertions, 0 failures, 2 errors
I had already created all relevant text fixtures and had already
modiefied my product_test.rb file prior to running this for my test
database.