Skip to content

Commit

Permalink
spec: skip ruby_exe tests for wasi due to lack of subprocess
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun authored and eregon committed Mar 28, 2022
1 parent bd47c2a commit 2bc5107
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/mspec/guards/platform.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def self.windows?
os?(:windows)
end

def self.wasi?
os?(:wasi)
end

def self.wsl?
if defined?(@wsl_p)
@wsl_p
Expand Down
2 changes: 2 additions & 0 deletions lib/mspec/helpers/ruby_exe.rb
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ def resolve_ruby_exe
end

def ruby_exe(code = :not_given, opts = {})
skip "WASI doesn't provide subprocess" if PlatformGuard.wasi?

if opts[:dir]
raise "ruby_exe(..., dir: dir) is no longer supported, use Dir.chdir"
end
Expand Down

0 comments on commit 2bc5107

Please sign in to comment.