Skip to content

Commit

Permalink
When canonicalizing query tests output, ignore empty lines: they usua…
Browse files Browse the repository at this point in the history
…lly contain

only comments
  • Loading branch information
adymo committed Aug 17, 2011
1 parent 911ec19 commit 60f9a8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions assert_same.rb
Expand Up @@ -140,6 +140,8 @@ def canonicalize_for_assert_same(text)
result_canonicalized= result.map do |line|
line.gsub(/\s*(#.*)?$/, '')
end
# ignore blank lines (usually they are lines with comments only)
result_canonicalized.delete_if { |line| line.blank? }

[result, result_canonicalized]
end
Expand Down

0 comments on commit 60f9a8f

Please sign in to comment.