Sha256: be7c72db52513bfb84c0f59369c3118233325337156037a6b25432b5563884ea

Contents?: true

Size: 648 Bytes

Versions: 25

Compression:

Stored size: 648 Bytes

Contents

require 'spec_helper'
require 'pathname'
require 'fileutils'

describe Evrone::CI::Worker::Docker do
  let(:options) { { } }
  let(:job)     { create :job, options }
  let(:path)    { '/tmp/.ci' }
  let(:local)   { described_class.new job, path }
  subject { local }

  after { FileUtils.rm_rf path }

  context "perform", run_docker: true do
    subject { local.perform }
    it { should eq 0 }

    context "when fail before_script" do
      let(:options) { { before_script: "false" } }
      it { should eq(-1) }
    end

    context "when fail script" do
      let(:options) { { script: "false" } }
      it { should eq(1) }
    end
  end

end

Version data entries

25 entries across 25 versions & 1 rubygems

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