Fix up Rubinius specific library specs.
[rbx.git] / spec / library / actor / unlink_spec.rb
blob8b02666e90d10a6d4a18f4a2d692a1623e3031e8
1 require File.dirname(__FILE__) + '/../../spec_helper'
2 require 'actor'
4 describe "Actor.unlink" do
5   it "sends an exit message to linked Actors" do
6     actor = Actor.spawn(Actor.current) do |master|
7       Actor.link(master)
9       Actor.receive do |f|
10         f.when(:ping) { Actor.unlink(master) }
11       end
13       raise "foo"
14     end
16     actor.send :ping
17     msg = Actor.receive do |f|
18       f.after(0) do end
19     end
21     msg.should == nil
22   end
23 end