Skip to content

Commit

Permalink
Spec for blocks on synchronous calls
Browse files Browse the repository at this point in the history
  • Loading branch information
tarcieri committed Dec 19, 2012
1 parent fdea0a1 commit f3adf82
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/support/actor_examples.rb
Expand Up @@ -30,6 +30,14 @@ class ExampleCrash < StandardError
actor.greet.should == "Hi, I'm Troy McClure"
end

it "supports synchronous calls with blocks" do
actor = actor_class.new "Blocky Ralboa"

block_executed = false
actor.run { block_executed = true }
block_executed.should be_true
end

it "supports synchronous calls via #method" do
method = actor_class.new("Troy McClure").method(:greet)
method.call.should == "Hi, I'm Troy McClure"
Expand Down

0 comments on commit f3adf82

Please sign in to comment.