Permalink
Browse files

Namedspaced generator indent method test refactoring

  • Loading branch information...
1 parent 8cd14c0 commit 5decf8352d6e3449d34d65eddd6debba3f9a61ff @avakhov avakhov committed Apr 26, 2012
Showing with 4 additions and 3 deletions.
  1. +4 −3 railties/test/generators/namespaced_generators_test.rb
@@ -64,9 +64,10 @@ def test_invokes_default_template_engine_even_with_no_action
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

0 comments on commit 5decf83

Please sign in to comment.