This file contains 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
require 'delegate' | |
module SidekiqExt | |
# Use read-only database if :db option is :read_only, | |
# otherwise use the default connection. | |
# | |
# Example: | |
# | |
# class MyWorker | |
# include Sidekiq::Worker |
This file contains 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
# This custom matcher can be used to test state machine | |
# | |
# Examples | |
# | |
# it { should have_event(:status, :event_name, [:state1, :state2] => [:state3, :state4]) } | |
# it { should have_event(:status, :event_name, { | |
# :state1 => :state3, | |
# :state1 => :state4, | |
# :state3 => :state3, | |
# :state2 => :state4 |