Skip to content

Commit 198d7fa

Browse files
committed
fix Style/YodaCondition
1 parent bda4029 commit 198d7fa

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,3 @@
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
8-
9-
# Offense count: 2
10-
# This cop supports unsafe autocorrection (--autocorrect-all).
11-
# Configuration parameters: EnforcedStyle.
12-
# SupportedStyles: forbid_for_all_comparison_operators, forbid_for_equality_operators_only, require_for_all_comparison_operators, require_for_equality_operators_only
13-
Style/YodaCondition:
14-
Exclude:
15-
- 'spec/metrics_spec.rb'
16-
- 'spec/middleware/metrics_spec.rb'

spec/middleware/metrics_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def app
5959
it "measures the request latency" do
6060
expect(Pliny::Metrics).to receive(:measure) do |key, opts|
6161
assert_equal(key, "requests.latency")
62-
assert(4 < opts[:value] && opts[:value] < 6)
62+
assert(opts[:value] > 4 && opts[:value] < 6)
6363
end
6464

6565
get "/hello"

0 commit comments

Comments
 (0)