Add Task::DSL#block attribute reader
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
@@ -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
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user