Permalink
Browse files

Test added to check mass_assignment_sanitizer is not present if --ski…

…p-active-record provided.
  • Loading branch information...
1 parent 6b3af02 commit 3c7b29da1b1fff83fb72a19426193332eaf63577 @arunagw arunagw committed Aug 1, 2011
Showing with 9 additions and 0 deletions.
  1. +9 −0 railties/test/generators/app_generator_test.rb
@@ -314,6 +314,15 @@ def test_force_old_style_hash
end
end
+ 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|
+ assert_no_match(/config.active_record.mass_assignment_sanitizer = :strict/, file)
+ end
+ end
+ end
+
protected
def action(*args, &block)

0 comments on commit 3c7b29d

Please sign in to comment.