diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-03-29 15:30:04 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-04-03 12:16:18 -0400 |
commit | 62a080309bf4c2fde377cf37aecce38b9818d423 (patch) | |
tree | 19582bb44ded3236936467e878b8d1d46a6255e5 /railties | |
parent | db924e1257f37dff441fee7c6e2bbd8ba382d7a6 (diff) | |
download | rails-62a080309bf4c2fde377cf37aecce38b9818d423.tar.gz rails-62a080309bf4c2fde377cf37aecce38b9818d423.tar.bz2 rails-62a080309bf4c2fde377cf37aecce38b9818d423.zip |
apps that depend on active record should load fixtures
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/test/test_helper.rb | 5 | ||||
-rw-r--r-- | railties/test/application/test_runner_test.rb | 7 |
2 files changed, 2 insertions, 10 deletions
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 ca40914d3b..4fd060341e 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 @@ -6,12 +6,11 @@ class ActiveSupport::TestCase <% unless options[:skip_active_record] -%> ActiveRecord::Migration.check_pending! - # Uncomment the `fixtures :all` line below to setup all fixtures in test/fixtures/*.yml - # for all tests in alphabetical order. + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. # # Note: You'll currently still have to declare fixtures explicitly in integration tests # -- they do not yet inherit this setting - # fixtures :all + fixtures :all <% end -%> # Add more helper methods to be used by all tests here... diff --git a/railties/test/application/test_runner_test.rb b/railties/test/application/test_runner_test.rb index 56ca3bc1a9..9701640974 100644 --- a/railties/test/application/test_runner_test.rb +++ b/railties/test/application/test_runner_test.rb @@ -184,13 +184,6 @@ module ApplicationTests end end - def test_not_load_fixtures_when_running_single_test - create_model_with_fixture - create_fixture_test :models, 'user' - assert_match "0 users", run_test_command('test/models/user_test.rb') - assert_match "3 users", run_test_command('test/models/user_test.rb -f') - end - def test_load_fixtures_when_running_test_suites create_model_with_fixture suites = [:models, :helpers, [:units, :unit], :controllers, :mailers, |