KitaitiMakoto commited on
Commit
403eb98
·
unverified ·
1 Parent(s): 8aaba9a

ruby : fix installation test (#2519)

Browse files
bindings/ruby/tests/test_package.rb CHANGED
@@ -18,11 +18,13 @@ class TestPackage < Test::Unit::TestCase
18
  end
19
 
20
  def test_install
21
- filename = `rake -Tbuild`.match(/(whispercpp-(?:.+)\.gem)/)[1]
 
 
22
  basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
23
  Dir.mktmpdir do |dir|
24
  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)
26
  end
27
  end
28
  end
 
18
  end
19
 
20
  def test_install
21
+ match_data = `rake -Tbuild`.match(/(whispercpp-(.+)\.gem)/)
22
+ filename = match_data[1]
23
+ version = match_data[2]
24
  basename = "whisper.#{RbConfig::CONFIG["DLEXT"]}"
25
  Dir.mktmpdir do |dir|
26
  system "gem", "install", "--install-dir", dir.shellescape, "pkg/#{filename.shellescape}", exception: true
27
+ assert_path_exist File.join(dir, "gems/whispercpp-#{version}/lib", basename)
28
  end
29
  end
30
  end