Skip to content

Commit 2a843db

Browse files
committed
fix code style
1 parent 9f5d975 commit 2a843db

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

.rubocop.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ AllCops:
66
Lint/EndAlignment:
77
AlignWith: variable
88

9+
Lint/UnneededSplatExpansion:
10+
Enabled: false
11+
912
Metrics/AbcSize:
1013
Max: 30
1114

spec/spec_helper.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,11 @@ def mepp(image_a, image_b)
5151
2>&1
5252
].join(' ')
5353
output = ImageOptim::Cmd.capture(command)
54-
if [0, 1].include?($CHILD_STATUS.exitstatus)
55-
num_r = '\d+(?:\.\d+(?:[eE][-+]?\d+)?)?'
56-
output[/\((#{num_r}), #{num_r}\)/, 1].to_f
57-
else
54+
unless [0, 1].include?($CHILD_STATUS.exitstatus)
5855
fail "compare #{image_a} with #{image_b} failed with `#{output}`"
5956
end
57+
num_r = '\d+(?:\.\d+(?:[eE][-+]?\d+)?)?'
58+
output[/\((#{num_r}), #{num_r}\)/, 1].to_f
6059
end
6160

6261
RSpec::Matchers.define :be_smaller_than do |expected|

0 commit comments

Comments
 (0)