aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators/plugin_generator_test.rb
diff options
context:
space:
mode:
authorbogdanvlviv <bogdanvlviv@gmail.com>2017-06-11 15:59:23 +0300
committerbogdanvlviv <bogdanvlviv@gmail.com>2017-06-14 12:10:17 +0300
commit6673cf7071094e87d473459452a2d0e4c2ccfebe (patch)
tree926d5c944b8fd71c1fa2db6ddbc5fc397722112e /railties/test/generators/plugin_generator_test.rb
parent326914dd3a15e04851c9ef4a47edeb3dad2ec381 (diff)
downloadrails-6673cf7071094e87d473459452a2d0e4c2ccfebe.tar.gz
rails-6673cf7071094e87d473459452a2d0e4c2ccfebe.tar.bz2
rails-6673cf7071094e87d473459452a2d0e4c2ccfebe.zip
Use `require_relative` instead of `require` with full path
Diffstat (limited to 'railties/test/generators/plugin_generator_test.rb')
-rw-r--r--railties/test/generators/plugin_generator_test.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index af16a2641a..63aa079a12 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -63,7 +63,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_no_file "config/routes.rb"
assert_no_file "app/assets/config/bukkits_manifest.js"
assert_file "test/test_helper.rb" do |content|
- assert_match(/require.+test\/dummy\/config\/environment/, content)
+ assert_match(/require_relative.+test\/dummy\/config\/environment/, content)
assert_match(/ActiveRecord::Migrator\.migrations_paths.+test\/dummy\/db\/migrate/, content)
assert_match(/Minitest\.backtrace_filter = Minitest::BacktraceFilter\.new/, content)
assert_match(/Rails::TestUnitReporter\.executable = 'bin\/test'/, content)
@@ -438,7 +438,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "spec/dummy/config/application.rb"
assert_no_file "test/dummy"
assert_file "test/test_helper.rb" do |content|
- assert_match(/require.+spec\/dummy\/config\/environment/, content)
+ assert_match(/require_relative.+spec\/dummy\/config\/environment/, content)
assert_match(/ActiveRecord::Migrator\.migrations_paths.+spec\/dummy\/db\/migrate/, content)
end
end
@@ -449,7 +449,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "spec/fake/config/application.rb"
assert_no_file "test/dummy"
assert_file "test/test_helper.rb" do |content|
- assert_match(/require.+spec\/fake\/config\/environment/, content)
+ assert_match(/require_relative.+spec\/fake\/config\/environment/, content)
assert_match(/ActiveRecord::Migrator\.migrations_paths.+spec\/fake\/db\/migrate/, content)
end
end