spec/ballast/operation_spec.rb in ballast-1.7.0 vs spec/ballast/operation_spec.rb in ballast-1.8.0
- old
+ new
@@ -30,10 +30,12 @@
expect(subject.context).to eq("CONTEXT")
end
end
describe "#in_em_thread" do
- it "should yield the block in EM::Synchrony thread" do
+ it "should call Ballast.in_em_thread" do
+ expect(Ballast).to receive(:in_em_thread).and_call_original
+
counter = 0
allow(EM).to receive(:reactor_running?).and_return(true)
expect(EM::Synchrony).to receive(:defer){|&block| block.call }
Ballast::Operation.new({}).in_em_thread { counter = 1 }
\ No newline at end of file