Sha256: 2fc5677483313c57ccd5346c225525604ebc81388ec3145e07d201bac0f11d2f
Contents?: true
Size: 681 Bytes
Versions: 12
Compression:
Stored size: 681 Bytes
Contents
require 'spec_helper' RSpec.describe Construi do describe 'run' do let(:targets) { ['target1', 'target2'] } let(:config) { { 'image' => 'image:latest' } } let(:runner) { instance_double(Construi::Runner).as_null_object } let(:runner_class) { class_double(Construi::Runner).as_stubbed_const } before { allow(Construi::Config).to receive(:load_file).with('construi.yml').and_return(config) } before { allow(runner_class).to receive(:new).with(config).and_return runner } subject! { Construi.run(targets) } it { expect(runner_class).to have_received(:new).with(config) } it { expect(runner).to have_received(:run).with(targets) } end end
Version data entries
12 entries across 12 versions & 1 rubygems