Permalink
Browse files

Simplifying test in app/generator

  • Loading branch information...
1 parent 0e17cf1 commit c4f18683d9d486473d32f5861c765700e20a4af0 @arunagw arunagw committed Dec 3, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 railties/test/generators/app_generator_test.rb
@@ -329,16 +329,16 @@ def test_force_old_style_hash
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
end
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

0 comments on commit c4f1868

Please sign in to comment.