Skip to content

Commit

Permalink
More specs for Process::Status#initialize
Browse files Browse the repository at this point in the history
These specs now cover the other arguments of the #initialize method.
  • Loading branch information
Yorick Peterse committed Jan 4, 2015
1 parent e25088a commit 28d7af6
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions spec/ruby/core/process/initialize_spec.rb
Expand Up @@ -4,4 +4,28 @@
it 'initializes a new Process::Status instance' do
Process::Status.new.should be_an_instance_of(Process::Status)
end

it 'initializes Process::Status with a PID' do
status = Process::Status.new(42)

status.pid.should == 42
end

it 'initializes Process::Status with a PID and status' do
status = Process::Status.new(42, 1)

status.exitstatus.should == 1
end

it 'initializes Process::Status with a PID, status and term signal' do
status = Process::Status.new(42, 1, 2)

status.termsig.should == 2
end

it 'initializes Process::Status with a PID, status, term signal and stop signal' do
status = Process::Status.new(42, 1, 2, 3)

status.stopsig.should == 3
end
end

0 comments on commit 28d7af6

Please sign in to comment.