File tree Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Expand file tree Collapse file tree 1 file changed +21
-18
lines changed Original file line number Diff line number Diff line change 11
11
require_relative '../../ruby/spec_helper'
12
12
13
13
describe "Truffle::Interop" do
14
- it "has a method for each InteropLibrary message" do
15
- all_methods = Primitive . interop_library_all_methods
16
- expected = all_methods . map do |name |
17
- name = name . gsub ( /([a-z])([A-Z])/ ) { "#{ $1} _#{ $2. downcase } " }
18
- if name . start_with? ( 'is_' , 'has_' , 'fits_' )
19
- name += '?'
20
- end
21
- if name . start_with? ( 'is_' )
22
- name = name [ 3 ..-1 ]
23
- elsif name . start_with? ( 'get_' )
24
- name = name [ 4 ..-1 ]
25
- end
26
- name . to_sym
27
- end . sort
14
+ # Run locally and in TruffleRuby's CI but not in GraalVM's CI to not prevent adding new interop messages
15
+ guard -> { !ENV . key? ( 'BUILD_URL' ) or ENV . key? ( 'TRUFFLERUBY_CI' ) } do
16
+ it "has a method for each InteropLibrary message" do
17
+ all_methods = Primitive . interop_library_all_methods
18
+ expected = all_methods . map do |name |
19
+ name = name . gsub ( /([a-z])([A-Z])/ ) { "#{ $1} _#{ $2. downcase } " }
20
+ if name . start_with? ( 'is_' , 'has_' , 'fits_' )
21
+ name += '?'
22
+ end
23
+ if name . start_with? ( 'is_' )
24
+ name = name [ 3 ..-1 ]
25
+ elsif name . start_with? ( 'get_' )
26
+ name = name [ 4 ..-1 ]
27
+ end
28
+ name . to_sym
29
+ end . sort
28
30
29
- actual = Truffle ::Interop . methods . sort
31
+ actual = Truffle ::Interop . methods . sort
30
32
31
- # pp expected
32
- # pp actual
33
- ( expected - actual ) . should == [ ]
33
+ # pp expected
34
+ # pp actual
35
+ ( expected - actual ) . should == [ ]
36
+ end
34
37
end
35
38
end
You can’t perform that action at this time.
0 commit comments