Sha256: a906619bab796f4d7c75c1f35d27c2c055e1f1b7ec7cd67955622de3b73147b5

Contents?: true

Size: 841 Bytes

Versions: 21

Compression:

Stored size: 841 Bytes

Contents

require "spec_helper"

describe "Bluepill:Process" do
  it "should raise exceptions unless properly initialized" do
    lambda {
      Bluepill::Process.new
    }.should raise_error(ArgumentError)
  end
  
  it "should construct a valid object when properly initialized" do
    lambda {
      Bluepill::Process.new("test_process") do |p|
        # The absolute minimum to construct a valid process
        p.start_command = "/dev/null"
        p.pid_file = "/var/run/test_process.pid"
      end
    }.should_not raise_error
  end
  
end

describe "A Bluepill::Process object" do
  before(:each) do
    @process = Bluepill::Process.new("test_process") do |p|
      p.start_command = "hai"
      p.daemonize = true
    end
  end
  
  it "should be in the unmonitored state after construction" do
    @process.should be_unmonitored
  end  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
bluepill-0.0.1 spec/process_spec.rb