Skip to content

Commit

Permalink
spec: test remote actor pesistant property
Browse files Browse the repository at this point in the history
  • Loading branch information
niamster committed Jan 17, 2015
1 parent ae5236d commit 8cd134c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions spec/dcell/actor_proxy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ def exit_handler(actor, reason)
@remote_actor.future(:value).value.should == 42
end

it "remote actor maintains context" do
# damn test won't work with multiple clients
mutable = @remote_actor.mutable
@remote_actor.mutable = mutable + 1
@remote_actor.mutable.should == mutable + 1
end

context :linking do
before :each do
@local_actor = LocalActor.new
Expand Down
2 changes: 2 additions & 0 deletions spec/test_node.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ class TestActor
include Celluloid
attr_reader :value
attr_accessor :magic
attr_accessor :mutable

def initialize
@value = 42
@mutable = 0
end

def the_answer
Expand Down

0 comments on commit 8cd134c

Please sign in to comment.