spec/qe/action_mailer_spec.rb in qe-0.3.4 vs spec/qe/action_mailer_spec.rb in qe-0.3.5
- old
+ new
@@ -26,14 +26,14 @@
job.mail
}.to raise_error(Qe::ActionMailer::MissingMailNameError)
end
it "returns object for :mail option" do
- job.stub :mailer => mailer
+ allow(job).to receive(:mailer).and_return(mailer)
- mailer
- .should_receive(:hello)
+ expect(mailer)
+ .to receive(:hello)
.with(job.options)
job.mail
end
end
@@ -47,12 +47,11 @@
end
describe "#perform" do
it "delivers e-mail" do
mail = double(:mail)
- job.stub :mail => mail
-
- mail.should_receive(:deliver)
+ allow(job).to receive_messages(:mail => mail)
+ expect(mail).to receive(:deliver)
job.perform
end
end
end