Sha256: 7959d1cb9a254dc3a61771c948c3c3b667ca12304ee77f452d28e27166ab7b0b
Contents?: true
Size: 1.19 KB
Versions: 4
Compression:
Stored size: 1.19 KB
Contents
RSpec.describe "Deprecated Celluloid::SyncCall", actor_system: :global do subject { Celluloid::SyncCall.new } let(:actor) { DeprecatedCallExampleActor.new } context "when obj does not respond to a method" do it "raises a NoMethodError" do expect do actor.the_method_that_wasnt_there end.to raise_exception(NoMethodError) expect(actor).to be_alive end context "when obj raises during inspect" do it "should emulate obj.inspect" do expect(actor).to_not receive(:inspect) expect { actor.no_such_method }.to raise_exception( NoMethodError, /undefined method `no_such_method' for #\<DeprecatedCallExampleActor:0x[a-f0-9]+>/, ) end end end it "aborts with ArgumentError when a method is called with too many arguments" do expect do actor.actual_method("with too many arguments") end.to raise_exception(ArgumentError) expect(actor).to be_alive end it "preserves call chains across synchronous calls" do actor2 = DeprecatedCallExampleActor.new(actor) uuid, next_actor_uuid = actor2.chained_call_ids expect(uuid).to eq next_actor_uuid end end unless $CELLULOID_BACKPORTED == false
Version data entries
4 entries across 4 versions & 1 rubygems