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

Version Path
construi-0.41.0 spec/lib/construi_spec.rb
construi-0.40.0 spec/lib/construi_spec.rb
construi-0.39.0 spec/lib/construi_spec.rb
construi-0.38.0 spec/lib/construi_spec.rb
construi-0.37.0 spec/lib/construi_spec.rb
construi-0.36.0 spec/lib/construi_spec.rb
construi-0.35.2 spec/lib/construi_spec.rb
construi-0.35.1 spec/lib/construi_spec.rb
construi-0.35.0 spec/lib/construi_spec.rb
construi-0.33.0 spec/lib/construi_spec.rb
construi-0.32.0 spec/lib/construi_spec.rb
construi-0.31.0 spec/lib/construi_spec.rb