As mentioned in another post recently, I have been trying to get Rails 3
and MongoDB working, firstly by following this handy document:

http://www.mongodb.org/display/DOCS/Rails+3+-+Getting+Started

Having done this, I found that the scaffold functional test code
contained the following:

require 'test_helper'
class JobsControllerTest < ActionController::TestCase
  setup do
    @job = jobs(:one)
  end
  # …. various basic tests here
end

I have defined a "one" job in jobs.yml. However, attempting to run tests
gives me such errors as:

NoMethodError: undefined method `jobs' for
#<JobsControllerTest:0x007f91c0f37da8>

If I understand correctly, this would suggest that the jobs.yml fixture
has not been loaded. Adding "fixtures :all" to test/test_helper.rb
simply produces NoMethodErrors for "fixtures". I'm not getting any
test.log entries to assist in debugging this, but I think that the
database connection is working as the app, running in a development
environment, successfully interacts with the development database.

Have I missed something vital out when doing the initial app setup,
perhaps?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to