spec/performable_mailer_spec.rb in delayed-0.4.0 vs spec/performable_mailer_spec.rb in delayed-0.5.0
- old
+ new
@@ -55,11 +55,11 @@
it 'enqueues a PerformableEmail job' do
expect {
job = MyMailer.with(foo: 1, bar: 2).delay.signup('john@example.com', beta_tester: false)
expect(job.payload_object.class).to eq(Delayed::PerformableMailer)
expect(job.payload_object.object.class).to eq(described_class)
- expect(job.payload_object.object.instance_variable_get('@mailer')).to eq(MyMailer)
- expect(job.payload_object.object.instance_variable_get('@params')).to eq(foo: 1, bar: 2)
+ expect(job.payload_object.object.instance_variable_get(:@mailer)).to eq(MyMailer)
+ expect(job.payload_object.object.instance_variable_get(:@params)).to eq(foo: 1, bar: 2)
expect(job.payload_object.method_name).to eq(:signup)
expect(job.payload_object.args).to eq(['john@example.com'])
expect(job.payload_object.kwargs).to eq(beta_tester: false)
}.to change { Delayed::Job.count }.by(1)
end