mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Simplifying test in app/generator
This commit is contained in:
parent
0e17cf17eb
commit
c4f18683d9
1 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue