diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2012-04-26 18:16:00 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2012-04-26 18:16:00 +0400 |
commit | 5decf8352d6e3449d34d65eddd6debba3f9a61ff (patch) | |
tree | b8d8eba59d0d6dfaea9b99b1cc0841e2c3e1bc34 /railties | |
parent | 8cd14c0bc9f9429f03d1181912355d2f48b98157 (diff) | |
download | rails-5decf8352d6e3449d34d65eddd6debba3f9a61ff.tar.gz rails-5decf8352d6e3449d34d65eddd6debba3f9a61ff.tar.bz2 rails-5decf8352d6e3449d34d65eddd6debba3f9a61ff.zip |
Namedspaced generator indent method test refactoring
Diffstat (limited to 'railties')
-rw-r--r-- | railties/test/generators/namespaced_generators_test.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/railties/test/generators/namespaced_generators_test.rb b/railties/test/generators/namespaced_generators_test.rb index abafcefde5..6f00fc5d26 100644 --- a/railties/test/generators/namespaced_generators_test.rb +++ b/railties/test/generators/namespaced_generators_test.rb @@ -64,9 +64,10 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase 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" + assert_file "app/controllers/test_app/account_controller.rb" do |content| + content.split("\n").each do |line| + assert_no_match line, /^\s+$/, "Don't indent blank lines" + end end end end |