Add Task::DSL#block attribute reader
This commit is contained in:
		@@ -15,7 +15,7 @@ module Producer
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        define_action :file_write,  Actions::FileWriter
 | 
					        define_action :file_write,  Actions::FileWriter
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        attr_accessor :env, :actions
 | 
					        attr_accessor :env, :block, :actions, :condition
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        def initialize(env, &block)
 | 
					        def initialize(env, &block)
 | 
				
			||||||
          @env        = env
 | 
					          @env        = env
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,12 +24,16 @@ module Producer::Core
 | 
				
			|||||||
        expect(dsl.env).to be env
 | 
					        expect(dsl.env).to be env
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      it 'assigns the given block' do
 | 
				
			||||||
 | 
					        expect(dsl.block).to be block
 | 
				
			||||||
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      it 'assigns no action' do
 | 
					      it 'assigns no action' do
 | 
				
			||||||
        expect(dsl.actions).to be_empty
 | 
					        expect(dsl.actions).to be_empty
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      it 'assigns true as the condition' do
 | 
					      it 'assigns true as the condition' do
 | 
				
			||||||
        expect(dsl.instance_eval { @condition }).to be true
 | 
					        expect(dsl.condition).to be true
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user