diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-07-29 14:23:10 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-07-29 14:23:10 +0900 |
commit | 0196551e6039ca864d1eee1e01819fcae12c1dc9 (patch) | |
tree | 899db0e49063164697a005bca64fc5b06c2a2cfc /railties/test/generators | |
parent | 0d981a2b3d26958f19e0613db8e5f480a34dd8fc (diff) | |
download | rails-0196551e6039ca864d1eee1e01819fcae12c1dc9.tar.gz rails-0196551e6039ca864d1eee1e01819fcae12c1dc9.tar.bz2 rails-0196551e6039ca864d1eee1e01819fcae12c1dc9.zip |
Use match? where we don't need MatchData
Diffstat (limited to 'railties/test/generators')
-rw-r--r-- | railties/test/generators/app_generator_test.rb | 6 |
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 5b439fdcba..43461036f3 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -678,7 +678,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_inclusion_of_listen_related_configuration_by_default run_generator - if RbConfig::CONFIG["host_os"] =~ /darwin|linux/ + if /darwin|linux/.match?(RbConfig::CONFIG["host_os"]) assert_listen_related_configuration else assert_no_listen_related_configuration @@ -690,7 +690,7 @@ class AppGeneratorTest < Rails::Generators::TestCase Object.const_set(:RUBY_ENGINE, "MyRuby") run_generator - if RbConfig::CONFIG["host_os"] =~ /darwin|linux/ + if /darwin|linux/.match?(RbConfig::CONFIG["host_os"]) assert_listen_related_configuration else assert_no_listen_related_configuration @@ -708,7 +708,7 @@ class AppGeneratorTest < Rails::Generators::TestCase def test_evented_file_update_checker_config run_generator assert_file "config/environments/development.rb" do |content| - if RbConfig::CONFIG["host_os"] =~ /darwin|linux/ + if /darwin|linux/.match?(RbConfig::CONFIG["host_os"]) assert_match(/^\s*config\.file_watcher = ActiveSupport::EventedFileUpdateChecker/, content) else assert_match(/^\s*# config\.file_watcher = ActiveSupport::EventedFileUpdateChecker/, content) |