Skip to content

Commit 32b9723

Browse files
committed
Core files are not always available, they are only there if the truffleruby repository is around
1 parent e073b59 commit 32b9723

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

spec/truffle/yarp_spec.rb

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212

1313
# Similar tests as in https://github.com/ruby/yarp/blob/main/.github/workflows/truffleruby.yml
1414
describe "YARP" do
15-
it "can parse core files" do
16-
root = File.expand_path("../..", __dir__)
17-
Dir.glob("#{root}/src/main/ruby/truffleruby/**/*.rb") do |file|
18-
Truffle::Debug.yarp_parse(File.read(file)).should.include?("Node")
15+
root = File.expand_path("../..", __dir__)
16+
17+
guard -> { Dir.exist?("#{root}/src/main/ruby/truffleruby") } do
18+
it "can parse core files" do
19+
Dir.glob("#{root}/src/main/ruby/truffleruby/**/*.rb") do |file|
20+
Truffle::Debug.yarp_parse(File.read(file)).should.include?("Node")
21+
end
1922
end
2023
end
2124

0 commit comments

Comments
 (0)