aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test
diff options
context:
space:
mode:
authorAlexey Vakhov <vakhov@gmail.com>2012-04-19 18:29:40 +0400
committerAlexey Vakhov <vakhov@gmail.com>2012-04-25 12:01:33 +0400
commit6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f (patch)
tree854afdde7bcfad2c3bc7eaaa4e8992aaec5cdfc0 /railties/test
parentcd556c9388171bff263825d3066ef440a00d01b3 (diff)
downloadrails-6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f.tar.gz
rails-6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f.tar.bz2
rails-6ac9e493fb14cf7f9ca426f1ddd077ece6dc581f.zip
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 5c63b13dce..a14bc95912 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