maximum showing line number on btest failure
Some tests in btest uses long src for btest and it is harmful to check the results. This patch introducing the limitation how many lines of code is shown on failure.
This commit is contained in:
parent
89466f4e91
commit
30a8dbc861
@ -749,6 +749,8 @@ end
|
||||
|
||||
def pretty(src, desc, result)
|
||||
src = src.sub(/\A\s*\n/, '')
|
||||
lines = src.lines
|
||||
src = lines[0..20].join + "(...snip)\n" if lines.size > 20
|
||||
(/\n/ =~ src ? "\n#{adjust_indent(src)}" : src) + " #=> #{desc}"
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user