Skip to content

Commit a16ac94

Browse files
committed
Change active job spec to use literals thus avoiding Ruby 2.4.0 warning
1 parent 806b58e commit a16ac94

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

spec/rspec/rails/matchers/active_job_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ def perform; end
211211

212212
it "passes with provided argument matchers" do
213213
expect {
214-
hello_job.perform_later(42, "David")
215-
}.to have_enqueued_job.with(instance_of(Fixnum), instance_of(String))
214+
ignoring_warnings { hello_job.perform_later(42, "David") }
215+
}.to have_enqueued_job.with(42, "David")
216216
end
217217

218218
it "generates failure message with all provided options" do

spec/support/helpers.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,13 @@ def with_isolated_config
1010
RSpec.configuration = original_config
1111
end
1212

13+
def ignoring_warnings
14+
original = $VERBOSE
15+
$VERBOSE = nil
16+
result = yield
17+
$VERBOSE = original
18+
result
19+
end
20+
1321
RSpec.configure {|c| c.include self}
1422
end

0 commit comments

Comments
 (0)