Add Task::DSL#block attribute reader

This commit is contained in:
Thibault Jouan 2014-01-20 00:08:17 +00:00
parent db1c452f96
commit 5455955fd2
2 changed files with 6 additions and 2 deletions

View File

@ -15,7 +15,7 @@ module Producer
define_action :file_write, Actions::FileWriter
attr_accessor :env, :actions
attr_accessor :env, :block, :actions, :condition
def initialize(env, &block)
@env = env

View File

@ -24,12 +24,16 @@ module Producer::Core
expect(dsl.env).to be env
end
it 'assigns the given block' do
expect(dsl.block).to be block
end
it 'assigns no action' do
expect(dsl.actions).to be_empty
end
it 'assigns true as the condition' do
expect(dsl.instance_eval { @condition }).to be true
expect(dsl.condition).to be true
end
end