Skip to content

Commit dbea077

Browse files
authored
Merge pull request #841 from HParker/fix-assigned-but-unused-variable-warnings
Fix assigned but unused variable warnings in test
2 parents f1d82ee + 41d0de5 commit dbea077

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/repo_apply_test.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,13 @@ def test_bare_repository_defaults_to_index
103103
assert_index_content 'README', new_content, bare_repo
104104

105105
diff = bare_repo.diff(new_commit, original_commit)
106-
106+
107107
assert_equal true, bare_repo.apply(diff)
108108
assert_index_content 'README', original_content, bare_repo
109109
end
110110

111111
def test_location_option
112-
new_commit, new_content, original_content = update_file(@repo, 'README')
112+
new_commit, _new_content, _original_content = update_file(@repo, 'README')
113113

114114
diff = @repo.diff(new_commit, @original_commit)
115115

@@ -166,4 +166,4 @@ def test_callbacks
166166
@repo.apply(diff, {:location => :index, :hunk_callback => 'this is not a callable object'})
167167
end
168168
end
169-
end
169+
end

test/settings_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_used_cache_size
1414

1515
size = Rugged::Settings.used_cache_size
1616
repo = FixtureRepo.from_libgit2("attr")
17-
diff = repo.diff("605812a", "370fe9ec22", :context_lines => 1, :interhunk_lines => 1)
17+
repo.diff("605812a", "370fe9ec22", :context_lines => 1, :interhunk_lines => 1)
1818

1919
# cache size should grow
2020
assert_operator size, :<, Rugged::Settings.used_cache_size

test/submodule_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ def test_submodule_setup_add
278278
end
279279

280280
# add a submodule using gitlink by default
281-
submodule = @repo.submodules.setup_add(url, submod_path)
281+
@repo.submodules.setup_add(url, submod_path)
282282

283283
assert File.file?(File.join(@repo.workdir, submod_path, '.git'))
284284
assert File.directory?(File.join(@repo.path, 'modules'))
@@ -287,7 +287,7 @@ def test_submodule_setup_add
287287

288288
assert_equal url, @repo.config["submodule.#{submod_path}.url"]
289289

290-
submodule = @repo.submodules.setup_add(url, second_submod_path, gitlink: false)
290+
@repo.submodules.setup_add(url, second_submod_path, gitlink: false)
291291

292292
assert File.directory?(File.join(@repo.workdir, second_submod_path, '.git'))
293293
refute File.exist?(File.join(@repo.path, 'modules', second_submod_path))

0 commit comments

Comments
 (0)