Permalink
Browse files

Refactor assertion of line numbers matching 4 spaces

  • Loading branch information...
1 parent 29aff93 commit e0235c3721bf69be28f60819fa9695261fe387b5 @carlosantoniodasilva carlosantoniodasilva committed Mar 18, 2014
Showing with 4 additions and 16 deletions.
  1. +4 −16 railties/test/application/rake/notes_test.rb
@@ -39,10 +39,7 @@ def teardown
assert_match(/note in ruby/, output)
assert_equal 9, lines.size
-
- lines.each do |line|
- assert_equal 4, line.size
- end
+ assert_equal [4], lines.map(&:size).uniq
end
end
@@ -64,10 +61,7 @@ def teardown
assert_no_match(/note in some_other directory/, output)
assert_equal 5, lines.size
-
- lines.each do |line_number|
- assert_equal 4, line_number.size
- end
+ assert_equal [4], lines.map(&:size).uniq
end
end
@@ -90,10 +84,7 @@ def teardown
assert_match(/note in some_other directory/, output)
assert_equal 6, lines.size
-
- lines.each do |line_number|
- assert_equal 4, line_number.size
- end
+ assert_equal [4], lines.map(&:size).uniq
end
end
@@ -118,10 +109,7 @@ def teardown
assert_no_match(/note in app directory/, output)
assert_equal 2, lines.size
-
- lines.each do |line_number|
- assert_equal 4, line_number.size
- end
+ assert_equal [4], lines.map(&:size).uniq
end
end

0 comments on commit e0235c3

Please sign in to comment.