Sha256: 3c4d3034966fc3853a40f7a0c4b73d2a4a96f3a121415b72dc9dd053395def0c

Contents?: true

Size: 809 Bytes

Versions: 27

Compression:

Stored size: 809 Bytes

Contents

require 'spec_helper'

describe Evrone::CI::Worker do

  context ".perform" do
    let(:job) { create :job }
    let(:run) { :docker }
    subject { described_class.perform job, '/tmp' }

    before do
      described_class.configure do |c|
        c.run = run
      end
    end

    context "when run at :docker" do
      let(:run) { :docker }
      let(:docker) { 'docker' }
      before do
        mock(Evrone::CI::Worker::Docker).new(job, '/tmp') { docker }
        mock(docker).perform { true }
      end

      it { should be }
    end

    context "when run at :local" do
      let(:run) { :local }
      let(:local) { 'local' }
      before do
        mock(Evrone::CI::Worker::Local).new(job, '/tmp') { local }
        mock(local).perform { true }
      end

      it { should be }
    end
  end

end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
evrone-ci-worker-0.2.0.pre28 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre27 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre26 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre25 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre24 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre23 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre22 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre21 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre20 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre19 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre18 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre17 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre15 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre14 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre13 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre12 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre11 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre10 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre9 spec/lib/worker_spec.rb
evrone-ci-worker-0.2.0.pre8 spec/lib/worker_spec.rb