Sha256: 2012983116fd02639f1807aaa5add8fa69b4b112e4d92ec3d1adcb44529be11d

Contents?: true

Size: 567 Bytes

Versions: 2

Compression:

Stored size: 567 Bytes

Contents

require 'spec_helper'

describe Turnip::RunnerDSL do
  describe '#step' do
    include Turnip::RunnerDSL

    it 'runs the step' do
      self.turnip_runner = Class.new do
        attr_accessor :args
        def run_steps(steps)
          self.args << steps
        end
      end.new
      self.turnip_runner.args = []

      step('description', 'extra_arg')
      step = turnip_runner.args.flatten.first
      step.should be_kind_of(Turnip::Builder::Step)
      step.description.should eq('description')
      step.extra_arg.should eq('extra_arg')
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
turnip-0.3.1 spec/runner_dsl_spec.rb
turnip-0.3.0 spec/runner_dsl_spec.rb