Namedspaced generator indent method test refactoring
This commit is contained in:
parent
8cd14c0bc9
commit
5decf8352d
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue