Skip to content

Commit efc0103

Browse files
committed
Fixed failing test on Windows thanks to @MSP-Greg.
1 parent 551fe2a commit efc0103

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

test/test_database.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,12 @@ def test_filename_with_attachment
4747

4848

4949
def test_filename_to_path
50-
assert_equal '', @db.filename
51-
pn = Pathname(Tempfile.new('thing').path)
52-
@db = SQLite3::Database.new pn
53-
assert_equal pn.expand_path.to_s, File.expand_path(@db.filename)
50+
tf = Tempfile.new 'thing'
51+
pn = Pathname tf.path
52+
db = SQLite3::Database.new pn
53+
assert_equal pn.expand_path.to_s, File.expand_path(db.filename)
5454
ensure
55-
pn.unlink if pn.exist?
55+
tf.close! if tf
5656
end
5757

5858

0 commit comments

Comments
 (0)