aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorArun Agrawal <arunagw@gmail.com>2011-12-03 15:46:24 +0530
committerArun Agrawal <arunagw@gmail.com>2011-12-03 16:12:02 +0530
commitc4f18683d9d486473d32f5861c765700e20a4af0 (patch)
treef12cfc6e02ff594da4c3ba22dfd5793a5ca7d064 /railties/test/generators
parent0e17cf17ebeb70490d7c7cd25c6bf8f9401e44b3 (diff)
downloadrails-c4f18683d9d486473d32f5861c765700e20a4af0.tar.gz
rails-c4f18683d9d486473d32f5861c765700e20a4af0.tar.bz2
rails-c4f18683d9d486473d32f5861c765700e20a4af0.zip
Simplifying test in app/generator
Diffstat (limited to 'railties/test/generators')
-rw-r--r--railties/test/generators/app_generator_test.rb6
1 files changed, 3 insertions, 3 deletions
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