This project is archived and is in readonly mode.

#5796 ✓stale
manu

Rails 3.0 generator inconsistency

Reported by manu | October 12th, 2010 @ 11:46 PM | in 3.x

I am trying create an app that has no DB backend.

I generated the app using

rails new myapp -T -O

The problem is when I create a controller

using

rails generate controller mycontroller

I see some test unit file being generated..

test/functional/home_controller_test.rb
test/unit/helpers/home_helper_test.rb

and therefore rake test causes the following error

./test/functional/home_controller_test.rb:1:in require': no such file to load -- test_helper (LoadError)

from ./test/functional/home_controller_test.rb:1
from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5
from /usr/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
from /usr/lib/ruby/gems/1.8/ge

Is this the expected behavior? I believe if I skip test unit, I should never have any test unit file created, right?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages