Skip to content

Commit 80a6949

Browse files
authored
Merge pull request #618 from tenderlove/random-fail
Fix random test failure
2 parents e8b2e64 + 3e27745 commit 80a6949

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

test/config_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def test_read_config_from_path
1818

1919
def test_read_global_config_file
2020
config = Rugged::Config.global
21-
assert config['user.name'] != nil
21+
refute_nil config['user.name']
2222
assert_nil config['core.bare']
2323
end
2424

test/lib_test.rb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ def test_search_path
3434
['search_path_system', '/tmp/system']]
3535

3636
paths.each do |opt, path|
37+
before = Rugged::Settings[opt]
3738
Rugged::Settings[opt] = path
38-
assert_equal(path, Rugged::Settings[opt])
39+
40+
begin
41+
assert_equal(path, Rugged::Settings[opt])
42+
ensure
43+
Rugged::Settings[opt] = before
44+
end
3945
end
4046
end
4147

0 commit comments

Comments
 (0)