Skip to content

Commit 551fe2a

Browse files
committed
Added test for the handling of arg objects with to_path available.
1 parent 7acadcb commit 551fe2a

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

test/test_database.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,17 @@ def test_filename_with_attachment
4545
tf.unlink if tf
4646
end
4747

48+
49+
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)
54+
ensure
55+
pn.unlink if pn.exist?
56+
end
57+
58+
4859
def test_error_code
4960
begin
5061
db.execute 'SELECT'

0 commit comments

Comments
 (0)