Skip to content

Commit e03a4ec

Browse files
headiusandrykonchin
authored andcommitted
Soften these specs to just expected frames
These don't need to test that the text is exactly the same. It is sufficient to confirm that the two frames are for "foo" and the block.
1 parent 272f74a commit e03a4ec

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

language/ensure_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,8 @@ def foo
339339
end
340340
end
341341
line = __LINE__
342-
foo.should == [
343-
"#{__FILE__}:#{line-3}:in 'foo'",
344-
"#{__FILE__}:#{line+1}:in 'block (3 levels) in <top (required)>'"
345-
]
342+
foo[0].should =~ /#{__FILE__}:#{line-3}:in 'foo'/
343+
foo[1].should =~ /#{__FILE__}:#{line+2}:in 'block/
346344
end
347345
end
348346
end

language/rescue_spec.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -573,10 +573,8 @@ def foo
573573
end
574574
end
575575
line = __LINE__
576-
foo.should == [
577-
"#{__FILE__}:#{line-3}:in 'foo'",
578-
"#{__FILE__}:#{line+1}:in 'block (3 levels) in <top (required)>'"
579-
]
576+
foo[0].should =~ /#{__FILE__}:#{line-3}:in 'foo'/
577+
foo[1].should =~ /#{__FILE__}:#{line+2}:in 'block/
580578
end
581579
end
582580

0 commit comments

Comments
 (0)