Skip to content

Commit b1e93a2

Browse files
committed
Exclude spec needing shebang support on Windows
1 parent 8513491 commit b1e93a2

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

core/process/spawn_spec.rb

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,21 +212,23 @@
212212
end.should output_to_fd("nil\n")
213213
end
214214

215-
it "uses the passed env['PATH'] to search the executable" do
216-
dir = tmp("spawn_path_dir")
217-
mkdir_p dir
218-
begin
219-
exe = 'process-spawn-executable-in-path'
220-
path = "#{dir}/#{exe}"
221-
File.write(path, "#!/bin/sh\necho $1")
222-
File.chmod(0755, path)
223-
224-
env = { "PATH" => "#{dir}#{File::PATH_SEPARATOR}#{ENV['PATH']}" }
225-
Process.wait Process.spawn(env, exe, 'OK', out: @name)
226-
$?.should.success?
227-
File.read(@name).should == "OK\n"
228-
ensure
229-
rm_r dir
215+
platform_is_not :windows do
216+
it "uses the passed env['PATH'] to search the executable" do
217+
dir = tmp("spawn_path_dir")
218+
mkdir_p dir
219+
begin
220+
exe = 'process-spawn-executable-in-path'
221+
path = "#{dir}/#{exe}"
222+
File.write(path, "#!/bin/sh\necho $1")
223+
File.chmod(0755, path)
224+
225+
env = { "PATH" => "#{dir}#{File::PATH_SEPARATOR}#{ENV['PATH']}" }
226+
Process.wait Process.spawn(env, exe, 'OK', out: @name)
227+
$?.should.success?
228+
File.read(@name).should == "OK\n"
229+
ensure
230+
rm_r dir
231+
end
230232
end
231233
end
232234

0 commit comments

Comments
 (0)