Files
redux-scraper/spec/support/matchers/job_matchers.rb
2025-07-01 19:16:44 +00:00

14 lines
317 B
Ruby

# typed: false
RSpec::Matchers.define :http_client_opts_with do |opts|
match do |actual|
pass = !!actual[:use_http_cache] == !!opts[:use_http_cache]
return false unless pass
if opts[:caused_by_entry] != :any
pass &&= actual[:caused_by_entry] == opts[:caused_by_entry]
end
pass
end
end