Skip to content

Commit

Permalink
Fix Style/NumericLiterals cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed Feb 9, 2020
1 parent 15300f7 commit 3e34d3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions .rubocop_todo.yml
Expand Up @@ -130,12 +130,6 @@ Style/ModuleFunction:
Style/MutableConstant:
Enabled: false

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: Strict.
Style/NumericLiterals:
MinDigits: 6

# Offense count: 23
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
Expand Down
8 changes: 4 additions & 4 deletions test/stored_support_test.rb
Expand Up @@ -10,11 +10,11 @@ def test_read
Zip::InputStream.open(STORED_ZIP_TEST_FILE) do |zis|
entry = zis.get_next_entry
assert_equal 'file1.txt', entry.name
assert_equal 1327, entry.size
assert_equal 1_327, entry.size
assert_equal ::File.open(INPUT_FILE1, 'r').read, zis.read
entry = zis.get_next_entry
assert_equal 'file2.txt', entry.name
assert_equal 41234, entry.size
assert_equal 41_234, entry.size
assert_equal ::File.open(INPUT_FILE2, 'r').read, zis.read
end
end
Expand All @@ -23,11 +23,11 @@ def test_encrypted_read
Zip::InputStream.open(ENCRYPTED_STORED_ZIP_TEST_FILE, 0, Zip::TraditionalDecrypter.new('password')) do |zis|
entry = zis.get_next_entry
assert_equal 'file1.txt', entry.name
assert_equal 1327, entry.size
assert_equal 1_327, entry.size
assert_equal ::File.open(INPUT_FILE1, 'r').read, zis.read
entry = zis.get_next_entry
assert_equal 'file2.txt', entry.name
assert_equal 41234, entry.size
assert_equal 41_234, entry.size
assert_equal ::File.open(INPUT_FILE2, 'r').read, zis.read
end
end
Expand Down

0 comments on commit 3e34d3b

Please sign in to comment.