Sha256: 61446f00626c9af9ffc66752cf7c35006c86b7d328e9e65078d4298742d2dc6b

Contents?: true

Size: 666 Bytes

Versions: 3

Compression:

Stored size: 666 Bytes

Contents

require 'spec_helper'
require 'tmpdir'

module Itamae
  describe Runner do
    around do |example|
      Dir.mktmpdir do |dir|
        Dir.chdir(dir) do
          example.run
        end
      end
    end

    describe ".run" do
      let(:recipes) { %w! ./recipe1.rb ./recipe2.rb ! }
      it "runs each recipe with the runner" do
        recipes.each do |r|
          recipe = double(:recipe)
          Recipe.stub(:new).with(
            an_instance_of(Itamae::Runner),
            File.expand_path(r)
          ).and_return(recipe)
          expect(recipe).to receive(:run)
        end
        described_class.run(recipes, :exec, {})
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
itamae-1.0.0.beta3 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta2 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta1 spec/unit/lib/itamae/runner_spec.rb