aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2012-04-25 06:15:12 -0700
committerJosé Valim <jose.valim@gmail.com>2012-04-25 06:15:12 -0700
commit33d80919ff9549c64ef7fc657d70012fd6e22fb0 (patch)
tree0ba58ea1dfbac20006647b81246e8c84c8614d62 /railties/test
parentcd65682835c3fe1cbad8d02f3282c64a24d29b71 (diff)
parent6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f (diff)
downloadrails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.tar.gz
rails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.tar.bz2
rails-33d80919ff9549c64ef7fc657d70012fd6e22fb0.zip
Merge pull request #5902 from avakhov/generator-no-indent-blank-lines
Don't indent blank lines in named base generators
Diffstat (limited to 'railties/test')
-rw-r--r--railties/test/generators/namespaced_generators_test.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb
index 76c34d4c50..abafcefde5 100644
--- a/railties/test/generators/namespaced_generators_test.rb
+++ b/railties/test/generators/namespaced_generators_test.rb
@@ -61,6 +61,14 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase
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