Skip to content

Instantly share code, notes, and snippets.

@dan-palmer
Created August 11, 2014 19:27
Show Gist options
  • Save dan-palmer/e9729dbbc05308640d4b to your computer and use it in GitHub Desktop.
Save dan-palmer/e9729dbbc05308640d4b to your computer and use it in GitHub Desktop.
Sidekiq Options Matcher for RSpec
RSpec::Matchers.define :have_sidekiq_options do |options|
match do |actual|
description { "has correct sidekiq options" }
options.each do |key,value|
#sidekiq options have stringified keys
break false unless actual.sidekiq_options_hash[key.to_s] == value
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment