spec/lib/dispatch-rider/callbacks/storage_spec.rb in dispatch-rider-1.5.3 vs spec/lib/dispatch-rider/callbacks/storage_spec.rb in dispatch-rider-1.6.0
- old
+ new
@@ -1,13 +1,11 @@
require 'spec_helper'
describe DispatchRider::Callbacks::Storage do
+ subject { described_class.new }
- subject{ described_class.new }
-
describe "adding callbacks" do
-
let!(:log) { [] }
let(:actual) { proc { log << :actual } }
describe "#around" do
example do
@@ -15,29 +13,26 @@
log << :abefore
job.call
log << :aafter
end
subject.for(:initialize).first[actual]
- log.should == [:abefore, :actual, :aafter]
+ expect(log).to eq [:abefore, :actual, :aafter]
end
end
describe "#before" do
example do
subject.before(:initialize) { log << :before }
subject.for(:initialize).first[actual]
- log.should == [:before, :actual]
+ expect(log).to eq [:before, :actual]
end
end
describe "#after" do
example do
subject.after(:initialize) { log << :after }
subject.for(:initialize).first[actual]
- log.should == [:actual, :after]
+ expect(log).to eq [:actual, :after]
end
end
-
end
-
-
end