13 lines
363 B
Ruby
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
|