fortuity / rails3-mongoid-devise

Deprecated. Use the new version at https://github.com/RailsApps.
285 stars 27 forks source link

undefined method `fixtures' for ActiveSupport::TestCase:Class (NoMethodError) #14

Closed turadg closed 13 years ago

turadg commented 13 years ago

With a fresh clone of this project there's some problem in the testing framework. Running,

git clone git://github.com/fortuity/rails3-mongoid-devise.git
cd rails3-mongoid-devise
rake test:functionals

Produces this error:

/Users/taleahma/Code/Ruby/course-check/test/test_helper.rb:10:in `<class:TestCase>': undefined method `fixtures' for ActiveSupport::TestCase:Class (NoMethodError)
    from /Users/taleahma/Code/Ruby/course-check/test/test_helper.rb:5:in `<top (required)>'
    from test/functional/check_nodes_controller_test.rb:1:in `require'
    from test/functional/check_nodes_controller_test.rb:1:in `<top (required)>'
    from /usr/local/Cellar/ruby/1.9.2-p0/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `load'
    from /usr/local/Cellar/ruby/1.9.2-p0/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `block in <main>'
    from /usr/local/Cellar/ruby/1.9.2-p0/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `each'
    from /usr/local/Cellar/ruby/1.9.2-p0/lib/ruby/1.9.1/rake/rake_test_loader.rb:5:in `<main>'
rake aborted!
fortuity commented 13 years ago

From the README:

"The application does not include tests (RSpec or otherwise). It relies on Devise and Mongoid which include extensive tests. This application is intended to be a basis for your own customized application and (in most cases) you will be writing your own tests for your required behavior."

turadg commented 13 years ago

Thanks for including the quote. I'm quite new to Rails and hadn't even thought about testing at the time I read the README.

While the project doesn't include tests, from the above text I wouldn't expect that it woudl cause the tests suite to throw an error. I did write my own test, following the canonical Rails guide, and that's when I encountered this error.

The README also says no support is offered for this project, so I understand if you choose not to make the test command work. In that case, my suggestion is that the above portion of the README indicate that even user-written tests will fail without some additional work and include the known problem with the missing "fixtures" method.

jcollum commented 12 years ago

I'm in a similar boat and agree with turadg. It's frustrating when your "out of the box" tests don't pass. The readme should tell people that at the least.

herval commented 12 years ago

Does anyone know why that error happens? I'm writing tests for a gem and got to the exact same error (undefined method `fixtures' for ActiveSupport::TestCase:Class (NoMethodError)), and apparently there's not a lot of references to it on the web AT ALL...

fortuity commented 12 years ago

Just wanted to point out that this project (fortuity / rails3-mongoid-devise) has been replaced by a newer version at https://github.com/RailsApps/rails3-mongoid-devise. The new version is actively maintained and has ongoing participation by contributors. You may get the help you need there.

-- Daniel

turadg commented 12 years ago

@fortuity thanks for the suggestion.