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.2.19 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.18 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.17 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.16 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.15 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.14 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.13 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.12 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.11 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.10 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.9 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.8 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.7 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.6 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.5 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.4 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.3 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.2 spec/unit/lib/itamae/runner_spec.rb
itamae-1.2.0 spec/unit/lib/itamae/runner_spec.rb
itamae-1.1.26 spec/unit/lib/itamae/runner_spec.rb