spec/capistrano/measure/timer_spec.rb in capistrano-measure-0.9.1 vs spec/capistrano/measure/timer_spec.rb in capistrano-measure-0.10.0

- old
+ new

@@ -1,6 +1,7 @@ require 'spec_helper' +require 'capistrano/measure/error' require 'capistrano/measure/timer' describe Capistrano::Measure::Timer do describe "#start" do it "should increase events array" do @@ -73,17 +74,17 @@ event = subject.events.last expect(event.indent).to eq 0 end it "should raise exception with unstarted event" do - expect{ subject.stop('test123') }.to raise_error(RuntimeError) + expect{ subject.stop('test123') }.to raise_error(::Capistrano::Measure::Error) end end describe "#report_events" do it "should raise exception if called in the middle of process" do subject.start('test') - expect{ subject.report_events }.to raise_error(RuntimeError) + expect{ subject.report_events }.to raise_error(::Capistrano::Measure::Error) end context "in completed state" do before(:each) do subject.start('test')