Skip to content

Commit 313f902

Browse files
committed
1 parent a7c94e0 commit 313f902

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

spec/mspec/lib/mspec/guards/platform.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ def self.windows?
4141
os?(:windows)
4242
end
4343

44+
def self.wasi?
45+
os?(:wasi)
46+
end
47+
4448
def self.wsl?
4549
if defined?(@wsl_p)
4650
@wsl_p

spec/mspec/lib/mspec/helpers/datetime.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ def new_datetime(opts = {})
2525
end
2626

2727
def with_timezone(name, offset = nil, daylight_saving_zone = "")
28+
skip "WASI doesn't have TZ concept" if PlatformGuard.wasi?
2829
zone = name.dup
2930

3031
if offset

spec/mspec/lib/mspec/helpers/ruby_exe.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def resolve_ruby_exe
112112
end
113113

114114
def ruby_exe(code = :not_given, opts = {})
115+
skip "WASI doesn't provide subprocess" if PlatformGuard.wasi?
116+
115117
if opts[:dir]
116118
raise "ruby_exe(..., dir: dir) is no longer supported, use Dir.chdir"
117119
end

0 commit comments

Comments
 (0)