Add Remote::Environment#variables attribute reader

This commit is contained in:
Thibault Jouan 2014-01-19 19:08:55 +00:00
parent 22dd5fbdf9
commit 705774f8ef
2 changed files with 4 additions and 3 deletions

View File

@ -17,6 +17,8 @@ module Producer
extend Forwardable
def_delegator :@variables, :key?
attr_reader :variables
def initialize(variables)
@variables = variables
end

View File

@ -28,7 +28,7 @@ module Producer::Core
describe '#initialize' do
it 'assigns the key/value pairs' do
expect(environment.instance_eval { @variables }).to eq variables
expect(environment.variables).to eq variables
end
end
@ -36,8 +36,7 @@ module Producer::Core
let(:key) { 'SOME_KEY' }
it 'forwards the message to @variables' do
expect(environment.instance_eval { @variables })
.to receive(:key?).with(key)
expect(environment.variables).to receive(:key?).with(key)
environment.key? key
end
end