spec/shared/actor_examples.rb in celluloid-0.17.2 vs spec/shared/actor_examples.rb in celluloid-0.17.3
- old
+ new
@@ -27,9 +27,20 @@
end
it "can be stored in hashes" do
expect(actor.hash).not_to eq(Kernel.hash)
expect(actor.object_id).not_to eq(Kernel.object_id)
+ expect(actor.eql? actor).to be_truthy
+ end
+
+ it "can be stored in hashes even when dead" do
+ actor.terminate
+
+ expect(actor.dead?).to be_truthy
+
+ expect(actor.hash).not_to eq(Kernel.hash)
+ expect(actor.object_id).not_to eq(Kernel.object_id)
+ expect(actor.eql? actor).to be_truthy
end
it "implements respond_to? correctly" do
expect(actor).to respond_to(:alive?)
end