Skip to content

Commit

Permalink
lint: Fix rubocop config and violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Nov 19, 2023
1 parent 341faec commit 2f0c614
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions rubocop/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ RSpec/ExampleLength:
Enabled: true
Max: 10

RSpec/ExpectChange:
Enabled: true
EnforcedStyle: block

RSpec/MultipleExpectations:
Enabled: false

Expand Down
8 changes: 4 additions & 4 deletions spec/lib/sidekiq/throttled/config_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

0 comments on commit 2f0c614

Please sign in to comment.