Implement `echo' task action
This commit is contained in:
21
spec/producer/core/actions/echo_spec.rb
Normal file
21
spec/producer/core/actions/echo_spec.rb
Normal file
@@ -0,0 +1,21 @@
|
||||
require 'spec_helper'
|
||||
|
||||
module Producer::Core
|
||||
describe Actions::Echo do
|
||||
let(:env) { Env.new }
|
||||
let(:text) { 'hello' }
|
||||
subject(:echo) { Actions::Echo.new(env, text) }
|
||||
|
||||
describe '#apply' do
|
||||
before do
|
||||
env.output = StringIO.new
|
||||
end
|
||||
|
||||
it 'outputs the string given as argument through env.output' do
|
||||
expect(env).to receive(:output).with(text)
|
||||
echo.apply
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user