Skip to content

Commit

Permalink
Update style
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Mar 29, 2024
1 parent 943dbbd commit b1a2983
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 12 deletions.
102 changes: 93 additions & 9 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,12 @@ Lint/RequireRangeParentheses:
Lint/UselessRescue:
Enabled: true

Lint/MixedCaseRange:
Enabled: true

Lint/RedundantRegexpQuantifiers:
Enabled: true

Naming/BlockForwarding:
Enabled: true

Expand Down Expand Up @@ -446,6 +452,30 @@ Style/RedundantInitialize:
Style/RedundantStringEscape:
Enabled: true

Style/ExactRegexpMatch:
Enabled: true

Style/RedundantArrayConstructor:
Enabled: true

Style/RedundantCurrentDirectoryInPath:
Enabled: true

Style/RedundantFilterChain:
Enabled: true

Style/RedundantRegexpArgument:
Enabled: true

Style/RedundantRegexpConstructor:
Enabled: true

Style/ReturnNilInPredicateMethodDefinition:
Enabled: true

Style/YAMLFileRead:
Enabled: true

RSpec/ExampleLength:
Enabled: false

Expand Down Expand Up @@ -497,12 +527,6 @@ RSpec/SubjectDeclaration:
RSpec/VerifiedDoubleReference:
Enabled: true

RSpec/FactoryBot/ConsistentParenthesesStyle:
Enabled: true

RSpec/FactoryBot/SyntaxMethods:
Enabled: true

RSpec/Rails/AvoidSetupHook:
Enabled: true

Expand All @@ -518,9 +542,6 @@ RSpec/DuplicatedMetadata:
RSpec/PendingWithoutReason:
Enabled: true

RSpec/FactoryBot/FactoryNameStyle:
Enabled: true

RSpec/RedundantAround:
Enabled: true

Expand All @@ -533,6 +554,39 @@ RSpec/Rails/MinitestAssertions:
RSpec/Rails/TravelAround:
Enabled: true

RSpec/BeEmpty:
Enabled: true

RSpec/ContainExactly:
Enabled: true

RSpec/EmptyMetadata:
Enabled: true

RSpec/Eq:
Enabled: true

RSpec/IndexedLet:
Enabled: false

RSpec/MatchArray:
Enabled: true

RSpec/MetadataStyle:
Enabled: true

RSpec/ReceiveMessages:
Enabled: true

RSpec/SpecFilePathFormat:
Enabled: false

RSpec/SpecFilePathSuffix:
Enabled: true

RSpec/Rails/NegationBeValid:
Enabled: true

Capybara/NegationMatcher:
Enabled: true

Expand All @@ -547,3 +601,33 @@ Capybara/SpecificMatcher:

Capybara/MatchStyle:
Enabled: true

Capybara/ClickLinkOrButtonStyle:
Enabled: true

Capybara/RSpec/HaveSelector:
Enabled: true

Capybara/RSpec/PredicateMatcher:
Enabled: true

FactoryBot/ConsistentParenthesesStyle:
Enabled: true

FactoryBot/SyntaxMethods:
Enabled: true

FactoryBot/FactoryNameStyle:
Enabled: true

FactoryBot/AssociationStyle:
Enabled: true

FactoryBot/FactoryAssociationWithStrategy:
Enabled: true

FactoryBot/IdSequence:
Enabled: true

FactoryBot/RedundantFactoryOption:
Enabled: true
2 changes: 1 addition & 1 deletion spec/lib/health_monitor/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class CustomProvider < HealthMonitor::Providers::Base
it 'accepts' do
expect {
subject.add_custom_provider(CustomProvider)
}.to change(subject, :providers).to(Array.new([CustomProvider]))
}.to change(subject, :providers).to([CustomProvider])
end

it 'returns CustomProvider class' do
Expand Down
3 changes: 1 addition & 2 deletions spec/support/providers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ def stub_sidekiq
allow_any_instance_of(Sidekiq::Workers).to receive(:size).and_return(5)

queue = instance_double(Sidekiq::Queue)
allow(queue).to receive(:latency).and_return(5)
allow(queue).to receive(:size).and_return(5)
allow(queue).to receive_messages(latency: 5, size: 10)
allow(Sidekiq::Queue).to receive(:new).and_return(queue)

retry_set = instance_double(Sidekiq::RetrySet)
Expand Down

0 comments on commit b1a2983

Please sign in to comment.