fix rubocop Lint/UnusedBlockArgument cop
This commit is contained in:
parent
2007be0ab6
commit
e211434830
|
|
@ -17,12 +17,6 @@ Lint/LiteralInCondition:
|
||||||
Lint/RescueException:
|
Lint/RescueException:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 4
|
|
||||||
# Cop supports --auto-correct.
|
|
||||||
Lint/UnusedBlockArgument:
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 1
|
||||||
Lint/UselessComparison:
|
Lint/UselessComparison:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ class ZipFileTest < MiniTest::Test
|
||||||
def test_add_case_sensitive
|
def test_add_case_sensitive
|
||||||
::Zip.case_insensitive_match = false
|
::Zip.case_insensitive_match = false
|
||||||
|
|
||||||
SRC_FILES.each { |fn, en| assert(::File.exist?(fn)) }
|
SRC_FILES.each { |fn, _en| assert(::File.exist?(fn)) }
|
||||||
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
||||||
|
|
||||||
SRC_FILES.each { |fn, en| zf.add(en, fn) }
|
SRC_FILES.each { |fn, en| zf.add(en, fn) }
|
||||||
|
|
@ -33,7 +33,7 @@ class ZipFileTest < MiniTest::Test
|
||||||
def test_add_case_insensitive
|
def test_add_case_insensitive
|
||||||
::Zip.case_insensitive_match = true
|
::Zip.case_insensitive_match = true
|
||||||
|
|
||||||
SRC_FILES.each { |fn, en| assert(::File.exist?(fn)) }
|
SRC_FILES.each { |fn, _en| assert(::File.exist?(fn)) }
|
||||||
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
||||||
|
|
||||||
assert_raises Zip::EntryExistsError do
|
assert_raises Zip::EntryExistsError do
|
||||||
|
|
@ -45,7 +45,7 @@ class ZipFileTest < MiniTest::Test
|
||||||
def test_add_case_sensitive_read_case_insensitive
|
def test_add_case_sensitive_read_case_insensitive
|
||||||
::Zip.case_insensitive_match = false
|
::Zip.case_insensitive_match = false
|
||||||
|
|
||||||
SRC_FILES.each { |fn, en| assert(::File.exist?(fn)) }
|
SRC_FILES.each { |fn, _en| assert(::File.exist?(fn)) }
|
||||||
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
zf = ::Zip::File.new(EMPTY_FILENAME, ::Zip::File::CREATE)
|
||||||
|
|
||||||
SRC_FILES.each { |fn, en| zf.add(en, fn) }
|
SRC_FILES.each { |fn, en| zf.add(en, fn) }
|
||||||
|
|
@ -54,7 +54,7 @@ class ZipFileTest < MiniTest::Test
|
||||||
::Zip.case_insensitive_match = true
|
::Zip.case_insensitive_match = true
|
||||||
|
|
||||||
zfRead = ::Zip::File.new(EMPTY_FILENAME)
|
zfRead = ::Zip::File.new(EMPTY_FILENAME)
|
||||||
assert_equal(SRC_FILES.collect { |fn, en| en.downcase }.uniq.size, zfRead.entries.length)
|
assert_equal(SRC_FILES.collect { |_fn, en| en.downcase }.uniq.size, zfRead.entries.length)
|
||||||
assert_equal(SRC_FILES.last.last.downcase, zfRead.entries.first.name.downcase)
|
assert_equal(SRC_FILES.last.last.downcase, zfRead.entries.first.name.downcase)
|
||||||
AssertEntry.assert_contents(SRC_FILES.last.first,
|
AssertEntry.assert_contents(SRC_FILES.last.first,
|
||||||
zfRead.get_input_stream(SRC_FILES.last.last) { |zis| zis.read })
|
zfRead.get_input_stream(SRC_FILES.last.last) { |zis| zis.read })
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue