Sha256: 52a601df24580d22926339bfd3922f0ad9585b9eb80a26f54ed25b83b924b369

Contents?: true

Size: 658 Bytes

Versions: 1

Compression:

Stored size: 658 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: "/bin/false" } }
      it { should eq(-1) }
    end

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

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
evrone-ci-worker-0.2.0.pre0 spec/lib/worker/docker_spec.rb