mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Refactor assertion of line numbers matching 4 spaces
This commit is contained in:
parent
29aff93dc4
commit
e0235c3721
1 changed files with 4 additions and 16 deletions
|
@ -39,10 +39,7 @@ module ApplicationTests
|
||||||
assert_match(/note in ruby/, output)
|
assert_match(/note in ruby/, output)
|
||||||
|
|
||||||
assert_equal 9, lines.size
|
assert_equal 9, lines.size
|
||||||
|
assert_equal [4], lines.map(&:size).uniq
|
||||||
lines.each do |line|
|
|
||||||
assert_equal 4, line.size
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -64,10 +61,7 @@ module ApplicationTests
|
||||||
assert_no_match(/note in some_other directory/, output)
|
assert_no_match(/note in some_other directory/, output)
|
||||||
|
|
||||||
assert_equal 5, lines.size
|
assert_equal 5, lines.size
|
||||||
|
assert_equal [4], lines.map(&:size).uniq
|
||||||
lines.each do |line_number|
|
|
||||||
assert_equal 4, line_number.size
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -90,10 +84,7 @@ module ApplicationTests
|
||||||
assert_match(/note in some_other directory/, output)
|
assert_match(/note in some_other directory/, output)
|
||||||
|
|
||||||
assert_equal 6, lines.size
|
assert_equal 6, lines.size
|
||||||
|
assert_equal [4], lines.map(&:size).uniq
|
||||||
lines.each do |line_number|
|
|
||||||
assert_equal 4, line_number.size
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -118,10 +109,7 @@ module ApplicationTests
|
||||||
assert_no_match(/note in app directory/, output)
|
assert_no_match(/note in app directory/, output)
|
||||||
|
|
||||||
assert_equal 2, lines.size
|
assert_equal 2, lines.size
|
||||||
|
assert_equal [4], lines.map(&:size).uniq
|
||||||
lines.each do |line_number|
|
|
||||||
assert_equal 4, line_number.size
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue