Skip to content

Commit

Permalink
Fix Style/Semicolon cop.
Browse files Browse the repository at this point in the history
  • Loading branch information
hainesr committed May 1, 2018
1 parent 122ccc4 commit ae4cae0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
7 changes: 0 additions & 7 deletions .rubocop_rubyzip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -327,13 +327,6 @@ Style/SafeNavigation:
- 'test/filesystem/file_stat_test.rb'
- 'test/test_helper.rb'

# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: AllowAsExpressionSeparator.
Style/Semicolon:
Exclude:
- 'test/file_test.rb'

# Offense count: 8
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
Expand Down
5 changes: 3 additions & 2 deletions test/file_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,9 @@ def test_add_existing_entry_name_replace
replacedEntry = nil
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
replacedEntry = zf.entries.first.name
zf.add(replacedEntry, 'test/data/file2.txt') { gotCalled = true; true }
gotCalled = zf.add(replacedEntry, 'test/data/file2.txt') { true }
end

assert(gotCalled)
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
assert_contains(zf, replacedEntry, 'test/data/file2.txt')
Expand Down Expand Up @@ -296,7 +297,7 @@ def test_rename_to_existing_entry_overwrite
renamedEntryName = nil
::Zip::File.open(TEST_ZIP.zip_name) do |zf|
renamedEntryName = zf.entries[0].name
zf.rename(zf.entries[0], zf.entries[1].name) { gotCalled = true; true }
gotCalled = zf.rename(zf.entries[0], zf.entries[1].name) { true }
end

assert(gotCalled)
Expand Down

0 comments on commit ae4cae0

Please sign in to comment.