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.pre6 spec/lib/worker/docker_spec.rb
evrone-ci-worker-0.2.0.pre5 spec/lib/worker/docker_spec.rb
evrone-ci-worker-0.2.0.pre4 spec/lib/worker/docker_spec.rb
evrone-ci-worker-0.2.0.pre3 spec/lib/worker/docker_spec.rb
evrone-ci-worker-0.2.0.pre1 spec/lib/worker/docker_spec.rb