From c4f18683d9d486473d32f5861c765700e20a4af0 Mon Sep 17 00:00:00 2001 From: Arun Agrawal Date: Sat, 3 Dec 2011 15:46:24 +0530 Subject: Simplifying test in app/generator --- railties/test/generators/app_generator_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index 41bb4d8b20..baa80419a6 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -329,8 +329,8 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_generated_environments_file_for_sanitizer run_generator [destination_root, "--skip-active-record"] - ["config/environments/development.rb", "config/environments/test.rb"].each do |env_file| - assert_file env_file do |file| + %w(development test).each do |env| + assert_file "config/environments/#{env}.rb" do |file| assert_no_match(/config.active_record.mass_assignment_sanitizer = :strict/, file) end end @@ -338,7 +338,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_generated_environments_file_for_auto_explain run_generator [destination_root, "--skip-active-record"] - %w(development test production).each do |env| + %w(development production).each do |env| assert_file "config/environments/#{env}.rb" do |file| assert_no_match %r(auto_explain_threshold_in_seconds), file end -- cgit v1.2.3