Implement Action#input, delegating to env input
This commit is contained in:
@@ -2,8 +2,9 @@ require 'spec_helper'
|
||||
|
||||
module Producer::Core
|
||||
describe Action do
|
||||
let(:input) { StringIO.new }
|
||||
let(:output) { StringIO.new }
|
||||
let(:env) { Env.new(output: output) }
|
||||
let(:env) { Env.new(input: input, output: output) }
|
||||
let(:arguments) { [:some, :arguments] }
|
||||
subject(:action) { Action.new(env, *arguments) }
|
||||
|
||||
@@ -19,6 +20,12 @@ module Producer::Core
|
||||
end
|
||||
end
|
||||
|
||||
describe '#input' do
|
||||
it 'returns env input' do
|
||||
expect(action.input).to be input
|
||||
end
|
||||
end
|
||||
|
||||
describe '#output' do
|
||||
it 'delegates to env output' do
|
||||
action.output.puts 'some content'
|
||||
|
Reference in New Issue
Block a user