Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Simplified the new break spec

  • Loading branch information...
commit 4d0e7aa81814aa5a1890092dbce3b71bb3b6fe54 1 parent 5c0cfb5
@subbuss subbuss authored brixen committed
Showing with 2 additions and 4 deletions.
  1. +2 −4 language/break_spec.rb
View
6 language/break_spec.rb
@@ -308,18 +308,16 @@ def three
it "runs ensures when breaking from a loop" do
ScratchPad.record []
- x = 1
while true
begin
ScratchPad << :begin
- break if x > 1
- x += 1
+ break if true
ensure
ScratchPad << :ensure
end
end
- ScratchPad.recorded.should == [:begin, :ensure, :begin, :ensure]
+ ScratchPad.recorded.should == [:begin, :ensure]
end
it "doesn't run ensures in the destination method" do

0 comments on commit 4d0e7aa

Please sign in to comment.
Something went wrong with that request. Please try again.