diff options
Diffstat (limited to 'railties/test/generators/namespaced_generators_test.rb')
-rw-r--r-- | railties/test/generators/namespaced_generators_test.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index 5c63b13dce..abafcefde5 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -56,11 +56,19 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase run_generator assert_file "config/routes.rb", /get "account\/foo"/, /get "account\/bar"/ end -# + def test_invokes_default_template_engine_even_with_no_action run_generator ["account"] assert_file "app/views/test_app/account" end + + def test_namespaced_controller_dont_indent_blank_lines + run_generator + assert_file "app/controllers/test_app/account_controller.rb" + File.readlines(File.expand_path("app/controllers/test_app/account_controller.rb", destination_root)).each do |line| + assert_no_match line.chomp, /^\s+$/, "Don't indent blank lines" + end + end end class NamespacedModelGeneratorTest < NamespacedGeneratorTestCase |