spec/reporter_spec.rb in konacha-2.0.0.beta3 vs spec/reporter_spec.rb in konacha-2.0.0
- old
+ new
@@ -45,11 +45,22 @@
subject.stop
end
end
describe "#process_mocha_event" do
+ before { subject.stub(:process_event) }
+
+ it "calls #start if passed the start event" do
+ subject.should_receive(:start).with(4)
+ subject.process_mocha_event({'event' => 'start', 'testCount' => 4})
+ end
+
+ it "calls #finish if passed the end event" do
+ subject.should_receive(:finish)
+ subject.process_mocha_event({'event' => 'end'})
+ end
+
it "creates the object" do
- subject.stub(:process_event)
subject.should_receive(:update_or_create_object).with('data', 'type')
subject.process_mocha_event({'data' => 'data', 'type' => 'type'})
end
it "calls #process_event with the converted event name" do