Skip to content

Commit

Permalink
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/truffle/specs/truffle/attachments/attach_spec.rb
Original file line number Diff line number Diff line change
@@ -35,6 +35,17 @@ def fixture
fixture.should == 14
scratch[0].should be_true
end

it "only runs the block once each time the line is executed" do
scratch = []

@attachments << Truffle::Attachments.attach(__FILE__, 14) do
scratch << :run
end

fixture.should == 14
scratch.size.should == 1
end

it "allows multiple blocks to be installed on the same line and runs both of them" do
scratch = []

0 comments on commit f7e243b

Please sign in to comment.