diff options
author | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-06-07 09:31:07 +0200 |
---|---|---|
committer | Stefan Sprenger <stefan.sprenger@dkd.de> | 2011-06-07 09:31:07 +0200 |
commit | 5afd83c03b8c7ef67b66b828b087221733124e95 (patch) | |
tree | 0005d3891f0d4d69559897aefdb0f6b1ae2f1f3b /railties/test | |
parent | a60624d6c08af9ed7e514ed8b4f87c8915c8bb55 (diff) | |
download | rails-5afd83c03b8c7ef67b66b828b087221733124e95.tar.gz rails-5afd83c03b8c7ef67b66b828b087221733124e95.tar.bz2 rails-5afd83c03b8c7ef67b66b828b087221733124e95.zip |
Add test for helper generator
Diffstat (limited to 'railties/test')
-rw-r--r-- | railties/test/engine/generators_test.rb | 13 |
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 |