Skip to content

Commit 38874c0

Browse files
author
Joel Lubrano
committed
Replace new Hash key syntax with old => format for Ruby 1.8.7
1 parent 55f2228 commit 38874c0

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

spec/rspec/rails/matchers/have_enqueued_mail_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def email_with_optional_args(required_arg, optional_arg = nil); end
1212
end
1313
end
1414

15-
RSpec.describe "HaveEnqueuedMail matchers", skip: !RSpec::Rails::FeatureCheck.has_active_job? do
15+
RSpec.describe "HaveEnqueuedMail matchers", :skip => !RSpec::Rails::FeatureCheck.has_active_job? do
1616
before do
1717
ActiveJob::Base.queue_adapter = :test
1818
end
@@ -186,27 +186,27 @@ def email_with_optional_args(required_arg, optional_arg = nil); end
186186
it "passes when deliver_later is called with a wait_until argument" do
187187
send_time = Date.tomorrow.noon
188188

189-
expect { TestMailer.test_email.deliver_later(wait_until: send_time) }
189+
expect { TestMailer.test_email.deliver_later(:wait_until => send_time) }
190190
.to have_enqueued_email(TestMailer, :test_email).at(send_time)
191191
end
192192

193193
it "generates a failure message with at" do
194194
send_time = Date.tomorrow.noon
195195

196196
expect {
197-
expect { TestMailer.test_email.deliver_later(wait_until: send_time + 1) }
197+
expect { TestMailer.test_email.deliver_later(:wait_until => send_time + 1) }
198198
.to have_enqueued_email(TestMailer, :test_email).at(send_time)
199199
}.to raise_error(/expected to enqueue TestMailer.test_email exactly 1 time at/)
200200
end
201201

202202
it "passes when deliver_later is called with a queue argument" do
203-
expect { TestMailer.test_email.deliver_later(queue: 'urgent_mail') }
203+
expect { TestMailer.test_email.deliver_later(:queue => 'urgent_mail') }
204204
.to have_enqueued_email(TestMailer, :test_email).on_queue('urgent_mail')
205205
end
206206

207207
it "generates a failure message with on_queue" do
208208
expect {
209-
expect { TestMailer.test_email.deliver_later(queue: 'not_urgent_mail') }
209+
expect { TestMailer.test_email.deliver_later(:queue => 'not_urgent_mail') }
210210
.to have_enqueued_email(TestMailer, :test_email).on_queue('urgent_mail')
211211
}.to raise_error(/expected to enqueue TestMailer.test_email exactly 1 time on queue urgent_mail/)
212212
end
@@ -223,7 +223,7 @@ def email_with_optional_args(required_arg, optional_arg = nil); end
223223
expect {
224224
expect {
225225
TestMailer.test_email.deliver_later
226-
TestMailer.email_with_args(3, 4).deliver_later(wait_until: send_time, queue: queue)
226+
TestMailer.email_with_args(3, 4).deliver_later(:wait_until => send_time, :queue => queue)
227227
}.to have_enqueued_email(TestMailer, :email_with_args).with(1, 2)
228228
}.to raise_error(message)
229229
end

0 commit comments

Comments
 (0)