Skip to content

Commit

Permalink
Fix rubocop
Browse files Browse the repository at this point in the history
  • Loading branch information
johnnyshields committed Sep 22, 2020
1 parent 4878fcd commit 75bec31
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions spec/performable_mailer_spec.rb
Expand Up @@ -46,11 +46,11 @@ def signup(email)
describe 'delay' do
it 'enqueues a PerformableEmail job' do
expect do
job = MyMailer.with(foo: 1, bar: 2).delay.signup('john@example.com')
job = MyMailer.with(:foo => 1, :bar => 2).delay.signup('john@example.com')
expect(job.payload_object.class).to eq(Delayed::PerformableMailer)
expect(job.payload_object.object.class).to eq(ActionMailer::Parameterized::Mailer)
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('@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'])
end.to change { Delayed::Job.count }.by(1)
Expand All @@ -60,7 +60,7 @@ def signup(email)
describe 'delay on a mail object' do
it 'raises an exception' do
expect do
MyMailer.with(foo: 1, bar: 2).signup('john@example.com').delay
MyMailer.with(:foo => 1, :bar => 2).signup('john@example.com').delay
end.to raise_error(RuntimeError)
end
end
Expand Down

0 comments on commit 75bec31

Please sign in to comment.