Sha256: 35c2097087984cb2abe64f9a07d607569c19c148efc4a1aa0c6dcc3624d6b1c3
Contents?: true
Size: 717 Bytes
Versions: 2
Compression:
Stored size: 717 Bytes
Contents
require 'spec_helper' describe Evrone::CI::Worker::DockerFetchRepo, run_docker: true do let(:exit_code) { 0 } let(:app) { ->(_) { exit_code } } let(:options) { {} } let(:job) { create :job, options } let(:env) { OpenStruct.new job: job } let(:mid) { described_class.new app } let(:docker_mid) { Evrone::CI::Worker::DockerStartContainer.new(mid) } subject { docker_mid.call env } it "should be" do expect(subject).to eq 0 end context "when fail to fetch repo" do let(:options) { { src: "/not-exists-repo.git" } } it "should be" do expect(subject).to eq(-128) expect(job.output).to be_include("does not exist") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
evrone-ci-worker-0.2.0.pre4 | spec/lib/worker/middlewares/docker_fetch_repo_spec.rb |
evrone-ci-worker-0.2.0.pre3 | spec/lib/worker/middlewares/docker_fetch_repo_spec.rb |