Add some new delegators in Test class:

* #remote (delegates to env.remote)
* #fs (delegates to env.remote.fs)
This commit is contained in:
Thibault Jouan
2014-01-18 22:53:54 +00:00
parent 22613059f1
commit 913cba6c23
4 changed files with 21 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ require 'spec_helper'
module Producer::Core
describe Test do
let(:env) { double 'env' }
let(:env) { Env.new }
let(:arguments) { [:some, :arguments] }
subject(:test) { Test.new(env, *arguments) }
@@ -34,6 +34,18 @@ module Producer::Core
end
end
describe '#remote' do
it 'returns env remote' do
expect(test.remote).to be test.env.remote
end
end
describe '#fs' do
it 'returns env remote fs' do
expect(test.fs).to be test.env.remote.fs
end
end
describe '#arguments' do
it 'returns the assigned arguments' do
expect(test.arguments).to eq arguments