Sha256: 14122fb6f070fc12947bc0b9ccb8af1f6f2c7e5615220cdbc80c1d08d651c2da

Contents?: true

Size: 751 Bytes

Versions: 83

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'
require 'tmpdir'

module Itamae
  describe Runner do
    subject { described_class.new(double(:node)) }

    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
        pending "Rewrite later"
        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, :local, {})
      end
    end
  end
end

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
itamae-1.0.0.beta49 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta48 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta47 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta46 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta45 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta44 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta43 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta42 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta41 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta40 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta39 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta38 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta37 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta36 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta35 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta34 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta33 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta32 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta31 spec/unit/lib/itamae/runner_spec.rb
itamae-1.0.0.beta30 spec/unit/lib/itamae/runner_spec.rb