aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-16 10:51:29 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2014-09-16 10:51:29 -0300
commit6e4aa9d5eab53bb0f5063145f5143d91a175a1f7 (patch)
treecef5240c6653b67f235d8c3acc80827dda43b21f /railties/test
parent0da9923926c6b3e61cbb2224b0edcd4248ac1be2 (diff)
parent8c9b3473427d865a7e34b0a2a7295456d2c52747 (diff)
downloadrails-6e4aa9d5eab53bb0f5063145f5143d91a175a1f7.tar.gz
rails-6e4aa9d5eab53bb0f5063145f5143d91a175a1f7.tar.bz2
rails-6e4aa9d5eab53bb0f5063145f5143d91a175a1f7.zip
Merge pull request #16914 from untidy-hair/fix_plugin_dummy_path_error
Use dynamic path for dummy app location in plugin's test_helper.rb
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/plugin_generator_test.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/railties/test/generators/plugin_generator_test.rb b/railties/test/generators/plugin_generator_test.rb
index 985644e8af..645efa5daf 100644
--- a/railties/test/generators/plugin_generator_test.rb
+++ b/railties/test/generators/plugin_generator_test.rb
@@ -54,7 +54,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
run_generator
assert_file "README.rdoc", /Bukkits/
assert_no_file "config/routes.rb"
- assert_file "test/test_helper.rb"
+ assert_file "test/test_helper.rb", /require.+test\/dummy\/config\/environment/
assert_file "test/bukkits_test.rb", /assert_kind_of Module, Bukkits/
end
@@ -270,6 +270,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "spec/dummy"
assert_file "spec/dummy/config/application.rb"
assert_no_file "test/dummy"
+ assert_file "test/test_helper.rb", /require.+spec\/dummy\/config\/environment/
end
def test_creating_dummy_application_with_different_name
@@ -277,6 +278,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "spec/fake"
assert_file "spec/fake/config/application.rb"
assert_no_file "test/dummy"
+ assert_file "test/test_helper.rb", /require.+spec\/fake\/config\/environment/
end
def test_creating_dummy_without_tests_but_with_dummy_path
@@ -284,6 +286,7 @@ class PluginGeneratorTest < Rails::Generators::TestCase
assert_file "spec/dummy"
assert_file "spec/dummy/config/application.rb"
assert_no_file "test"
+ assert_no_file "test/test_helper.rb"
assert_file '.gitignore' do |contents|
assert_match(/spec\/dummy/, contents)
end