Skip to content

Commit 22b4d76

Browse files
committed
Updated tests for TruffleRuby [skip ci]
1 parent da3870d commit 22b4d76

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ gemspec
44

55
gem "rake"
66
gem "minitest"
7-
gem "numo-narray", platform: :ruby
7+
gem "numo-narray", platforms: :mri
88
gem "pg", platform: :ruby
99
gem "jdbc-postgres", platform: :jruby
1010
gem "sequel"

test/pg_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class PgTest < Minitest::Test
44
def setup
5-
skip if RUBY_PLATFORM == "java"
5+
skip if RUBY_ENGINE == "jruby"
66

77
conn.exec("DELETE FROM pg_items")
88
end

test/sequel_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require_relative "test_helper"
22

3-
adapter = RUBY_PLATFORM == "java" ? "jdbc:postgresql" : "postgres"
3+
adapter = RUBY_ENGINE == "jruby" ? "jdbc:postgresql" : "postgres"
44
DB = Sequel.connect("#{adapter}://localhost/pgvector_ruby_test")
55

66
if ENV["VERBOSE"]

test/vector_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def test_to_a
1212
end
1313

1414
def test_numo
15-
skip if RUBY_PLATFORM == "java"
15+
skip if ["jruby", "truffleruby"].include?(RUBY_ENGINE)
1616

1717
a = Pgvector::Vector.new([1, 2, 3])
1818
b = Pgvector::Vector.new(Numo::NArray.cast([1, 2, 3]))

0 commit comments

Comments
 (0)