aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/engine/generators_test.rb13
1 files changed, 10 insertions, 3 deletions
diff --git a/railties/test/engine/generators_test.rb b/railties/test/engine/generators_test.rb
index bda1f0a23b..4af315f696 100644
--- a/railties/test/engine/generators_test.rb
+++ b/railties/test/engine/generators_test.rb
@@ -28,7 +28,7 @@ module EngineTests
tmp_path('foo_bar')
end
- def bundle_exec(cmd)
+ def bundled_rails(cmd)
`bundle exec rails #{cmd}`
end
@@ -68,16 +68,23 @@ module EngineTests
def test_controllers_are_correctly_namespaced
Dir.chdir(engine_path) do
- bundle_exec("g controller topics")
+ bundled_rails("g controller topics")
assert_file "app/controllers/foo_bar/topics_controller.rb", /FooBar::TopicsController/
end
end
def test_models_are_correctly_namespaced
Dir.chdir(engine_path) do
- bundle_exec("g model topic")
+ bundled_rails("g model topic")
assert_file "app/models/foo_bar/topic.rb", /FooBar::Topic/
end
end
+
+ def test_helpers_are_correctly_namespaced
+ Dir.chdir(engine_path) do
+ bundled_rails("g helper topics")
+ assert_file "app/helpers/foo_bar/topics_helper.rb", /FooBar::TopicsHelper/
+ end
+ end
end
end