nsca-client/spec/nsca/client/host_spec.rb
2012-12-07 16:37:23 -02:00

13 lines
363 B
Ruby

require 'spec_helper'
describe NSCA::Client::Host do
subject { described_class.new(:hostname => 'dummy') }
its(:hostname) { should eq 'dummy' }
context "current machine" do
before { Socket.stub(:gethostname).and_return('dummy-client-machine') }
subject { described_class.current }
its(:hostname) { should eq 'dummy-client-machine' }
end
end