Make Remote#hostname attribute read-only
This commit is contained in:
@@ -4,7 +4,7 @@ module Producer
|
||||
require 'etc'
|
||||
require 'net/ssh'
|
||||
|
||||
attr_accessor :hostname
|
||||
attr_reader :hostname
|
||||
|
||||
def initialize(hostname)
|
||||
@hostname = hostname
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user