14 lines
317 B
Ruby
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
|