From 9023e3b773769c90e0e43a10427895d7486e60cc Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Wed, 30 Jul 2014 23:06:30 -0300 Subject: Simplify plugin tests a bit, leave the regexp work for minitest --- railties/test/generators/plugin_generator_test.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'railties') diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb index 0486c22772..129515a17b 100644 --- a/railties/test/generators/plugin_generator_test.rb +++ b/railties/test/generators/plugin_generator_test.rb @@ -378,8 +378,8 @@ class PluginGeneratorTest < Rails::Generators::TestCase run_generator [destination_root] assert_file "bukkits.gemspec" do |contents| - assert_match(/#{Regexp.escape(name)}/, contents) - assert_match(/#{Regexp.escape(email)}/, contents) + assert_match name, contents + assert_match email, contents end end @@ -388,7 +388,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase run_generator [destination_root] assert_file "MIT-LICENSE" do |contents| - assert_match(/#{Regexp.escape(name)}/, contents) + assert_match name, contents end end @@ -398,11 +398,11 @@ class PluginGeneratorTest < Rails::Generators::TestCase run_generator [destination_root, '--skip-git'] assert_file "MIT-LICENSE" do |contents| - assert_match(/#{Regexp.escape(name)}/, contents) + assert_match name, contents end assert_file "bukkits.gemspec" do |contents| - assert_match(/#{Regexp.escape(name)}/, contents) - assert_match(/#{Regexp.escape(email)}/, contents) + assert_match name, contents + assert_match email, contents end end -- cgit v1.2.3