Namedspaced generator indent method test refactoring

This commit is contained in:
Alexey Vakhov 2012-04-26 18:16:00 +04:00
parent 8cd14c0bc9
commit 5decf8352d
1 changed files with 4 additions and 3 deletions

View File

@ -64,9 +64,10 @@ class NamespacedControllerGeneratorTest < NamespacedGeneratorTestCase
def test_namespaced_controller_dont_indent_blank_lines def test_namespaced_controller_dont_indent_blank_lines
run_generator run_generator
assert_file "app/controllers/test_app/account_controller.rb" assert_file "app/controllers/test_app/account_controller.rb" do |content|
File.readlines(File.expand_path("app/controllers/test_app/account_controller.rb", destination_root)).each do |line| content.split("\n").each do |line|
assert_no_match line.chomp, /^\s+$/, "Don't indent blank lines" assert_no_match line, /^\s+$/, "Don't indent blank lines"
end
end end
end end
end end