Skip to content

Commit 850f7b1

Browse files
ruby : fix installation test (#2519)
1 parent d4bc413 commit 850f7b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bindings/ruby/tests/test_package.rb

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ def setup
1818
end
1919

2020
def test_install
21-
filename = `rake -Tbuild`.match(/(whispercpp-(?:.+)\.gem)/)[1]
21+
match_data = `rake -Tbuild`.match(/(whispercpp-(.+)\.gem)/)
22+
filename = match_data[1]
23+
version = match_data[2]
2224
basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
2325
Dir.mktmpdir do |dir|
2426
system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true
25-
assert_path_exist File.join(dir, "gems/whispercpp-1.3.0/lib", basename)
27+
assert_path_exist File.join(dir, "gems/whispercpp-#{version}/lib", basename)
2628
end
2729
end
2830
end

0 commit comments

Comments
 (0)