diff --git a/rubocop/rspec.yml b/rubocop/rspec.yml index c129a663..8ca037ed 100644 --- a/rubocop/rspec.yml +++ b/rubocop/rspec.yml @@ -2,6 +2,10 @@ RSpec/ExampleLength: Enabled: true Max: 10 +RSpec/ExpectChange: + Enabled: true + EnforcedStyle: block + RSpec/MultipleExpectations: Enabled: false diff --git a/spec/lib/sidekiq/throttled/config_spec.rb b/spec/lib/sidekiq/throttled/config_spec.rb index 47662faa..6503f5f7 100644 --- a/spec/lib/sidekiq/throttled/config_spec.rb +++ b/spec/lib/sidekiq/throttled/config_spec.rb @@ -24,12 +24,12 @@ it "fails if given value is neither `NilClass` nor `Float`" do expect { config.cooldown_period = 42 } - .to raise_error(TypeError, /unexpected type/) + .to raise_error(TypeError, %r{unexpected type}) end it "fails if given value is not positive" do expect { config.cooldown_period = 0.0 } - .to raise_error(ArgumentError, /must be positive/) + .to raise_error(ArgumentError, %r{must be positive}) end end @@ -47,12 +47,12 @@ it "fails if given value is not `Integer`" do expect { config.cooldown_threshold = 42.0 } - .to raise_error(TypeError, /unexpected type/) + .to raise_error(TypeError, %r{unexpected type}) end it "fails if given value is not positive" do expect { config.cooldown_threshold = 0 } - .to raise_error(ArgumentError, /must be positive/) + .to raise_error(ArgumentError, %r{must be positive}) end end end