Make Remote#hostname attribute read-only

This commit is contained in:
Thibault Jouan 2014-01-19 23:41:27 +00:00
parent b1e182cc93
commit 4603ce777f
2 changed files with 3 additions and 3 deletions

View File

@ -4,7 +4,7 @@ module Producer
require 'etc'
require 'net/ssh'
attr_accessor :hostname
attr_reader :hostname
def initialize(hostname)
@hostname = hostname

View File

@ -5,8 +5,8 @@ module Producer::Core
let(:hostname) { 'some_host.example' }
subject(:remote) { Remote.new(hostname) }
describe '#hostname' do
it 'returns the assignated hostname' do
describe '#initialize' do
it 'assigns the given hostname' do
expect(remote.hostname).to eq hostname
end
end