Sha256: cf2b438b35601652a25cd1b1ce7adb0753608a1e78b3eef4929b9d1d43136996

Contents?: true

Size: 636 Bytes

Versions: 3

Compression:

Stored size: 636 Bytes

Contents

require 'spec_helper'

describe EventedBluepill::ProcessConditions::ProcessCondition do
  before do
    @condition = EventedBluepill::ProcessConditions::ProcessCondition.new 'name', stub(:actual_pid => 0)
  end

  describe "#run" do
    it "must raise" do
      assert_raises RuntimeError do
        @condition.run
      end
    end
  end

  describe "#check" do
    it "must raise" do
      assert_raises RuntimeError do
        @condition.check 0
      end
    end
  end

  describe "#format_value" do
    it "must return the argument" do
      value = [1, 2, 3]
      @condition.format_value(value).must_equal value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
evented_bluepill-0.0.52 spec/process_condition_spec.rb
evented_bluepill-0.0.51 spec/process_condition_spec.rb
evented_bluepill-0.0.50 spec/process_condition_spec.rb