spec/lib/bluepill/process_statistics_spec.rb in bluepill-0.0.67 vs spec/lib/bluepill/process_statistics_spec.rb in bluepill-0.0.68
- old
+ new
@@ -4,21 +4,21 @@
end
it "should record events" do
@stats.record_event('some event', 'some reason')
@stats.record_event('another event', 'another reason')
- @stats.events.should have(2).events
+ expect(@stats.events.size).to eq(2)
end
it "should record #EVENTS_TO_PERSIST events" do
(2 * Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).times do
@stats.record_event('some event', 'some reason')
end
- @stats.events.should have(Bluepill::ProcessStatistics::EVENTS_TO_PERSIST).events
+ expect(@stats.events.size).to eq(Bluepill::ProcessStatistics::EVENTS_TO_PERSIST)
end
it "should return event history" do
@stats.record_event('some event', 'some reason')
- @stats.to_s.should match(/some reason/)
- @stats.to_s.should match(/event history/)
+ expect(@stats.to_s).to match(/some reason/)
+ expect(@stats.to_s).to match(/event history/)
end
end