diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2010-04-09 01:06:41 -0300 |
---|---|---|
committer | Michael Koziarski <michael@koziarski.com> | 2010-04-09 16:46:40 +1200 |
commit | a654ef2ee11142f3764fb312aa84a979adb890d9 (patch) | |
tree | 110eda1067675ae57cdc8ab850f06e52fd521305 /railties/lib/rails | |
parent | 808847792c84e6d21ed7a2fb24b7e711b0007171 (diff) | |
download | rails-a654ef2ee11142f3764fb312aa84a979adb890d9.tar.gz rails-a654ef2ee11142f3764fb312aa84a979adb890d9.tar.bz2 rails-a654ef2ee11142f3764fb312aa84a979adb890d9.zip |
Don't include fixtures if --skip-activerecord is given
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/rails/app/app_generator.rb | 12 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/test/test_helper.rb | 2 |
2 files changed, 13 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/rails/app/app_generator.rb b/railties/lib/rails/generators/rails/app/app_generator.rb index df6e98f38d..6d085f0935 100644 --- a/railties/lib/rails/generators/rails/app/app_generator.rb +++ b/railties/lib/rails/generators/rails/app/app_generator.rb @@ -157,7 +157,17 @@ module Rails::Generators def create_test_files return if options[:skip_testunit] - directory "test" + empty_directory "test" + + inside "test" do + template "test_helper.rb" + + directory "fixtures" + directory "functional" + directory "integration" + directory "performance" + directory "unit" + end end def create_tmp_files diff --git a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb index 8bf1192ffe..c5e9cc2fc3 100644 --- a/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb +++ b/railties/lib/rails/generators/rails/app/templates/test/test_helper.rb @@ -7,7 +7,9 @@ class ActiveSupport::TestCase # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting +<% unless options[:skip_activerecord] -%> fixtures :all +<% end -%> # Add more helper methods to be used by all tests here... end |