1require_relative '../../spec_helper'
2require_relative 'fixtures/classes'
3
4# These specs only run a basic usage of #spawn.
5# Process.spawn has more complete specs and they are not
6# run here as it is redundant and takes too long for little gain.
7describe "Kernel#spawn" do
8  it "is a private method" do
9    Kernel.should have_private_instance_method(:spawn)
10  end
11
12  it "executes the given command" do
13    lambda {
14      Process.wait spawn("echo spawn")
15    }.should output_to_fd("spawn\n")
16  end
17end
18
19describe "Kernel.spawn" do
20  it "executes the given command" do
21    lambda {
22      Process.wait Kernel.spawn("echo spawn")
23    }.should output_to_fd("spawn\n")
24  end
25end
26