Created
August 11, 2014 19:27
-
-
Save dan-palmer/e9729dbbc05308640d4b to your computer and use it in GitHub Desktop.
Sidekiq Options Matcher for RSpec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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