Add specs for initialization of Foreman::Process

This commit is contained in:
brainopia
2012-01-22 08:54:42 +04:00
parent a008886bd0
commit 2ed1fe8d44

View File

@@ -1,2 +1,19 @@
require "spec_helper"
require "foreman/process"
require 'ostruct'
describe Foreman::Process do
subject { described_class.new entry, number, port }
let(:number) { 1 }
let(:port) { 777 }
let(:command) { :script }
let(:name) { :foobar }
let(:entry) { OpenStruct.new :name => name, :command => command }
its(:entry) { entry }
its(:num) { number }
its(:port) { port }
its(:name) { "#{name}.#{port}" }
its(:pid) { nil }
end