Sha256: d730f9e003dedf984f2c45fb5165cec6bc562a99cc7a334b7d0439e9c8324d4b
Contents?: true
Size: 916 Bytes
Versions: 2
Compression:
Stored size: 916 Bytes
Contents
RSpec.describe Celluloid::Proxy::Abstract do around do |ex| Celluloid.boot ex.run Celluloid.shutdown end let(:task_klass) { Celluloid.task_class } let(:actor_class) { ExampleActorClass.create(CelluloidSpecs.included_module, task_klass) } let(:actor) { actor_class.new "Troy McClure" } let(:logger) { Specs::FakeLogger.current } it "should be eql? to self" do expect(actor.eql?(actor)).to be_truthy end it "should be eql? to self even if dead" do actor.terminate expect(actor.eql?(actor)).to be_truthy end it "should not be eql? to other proxy objects" do other_future = Celluloid::Proxy::Future.new(actor.mailbox, actor.__klass__) expect(actor.future.eql?(other_future)).to be_truthy end it "should be possible to compare with non-proxy objects" do expect(actor.eql?("string")).to be_falsey expect("string".eql?(actor)).to be_falsey end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
celluloid-0.18.0 | spec/celluloid/proxy_spec.rb |
celluloid-0.18.0.pre2 | spec/celluloid/proxy_spec.rb |