Sha256: 714d4061c77627e7fe3e28151d3a9f1dc40765147ea6cc443c62f2a5f455f19a

Contents?: true

Size: 1.1 KB

Versions: 4

Compression:

Stored size: 1.1 KB

Contents

require 'spec_helper'

describe Evrone::CI::Worker::Configuration do
  let(:config) { Evrone::CI::Worker.config }
  subject { config }

  its(:run)             { should eq :docker     }
  its(:docker)          { should be             }
  its(:work_dir_name)   { should eq 'work'      }
  its(:repo_dir_name)   { should eq 'repo'      }
  its(:timeout)         { should eq 1800        }
  its(:amqp_url)        { should be_nil         }

  context "docker" do
    subject { config.docker }

    its(:ssh)           { should be             }
    its(:remote_dir)    { should eq '/home/ci'  }
    its(:init)          { should be             }
    its(:image)         { should eq 'ci'        }
  end

  context "docker.ssh" do
    subject { config.docker.ssh }

    its(:user)          { should eq 'ci'        }
    its(:password)      { should eq 'ci'        }
  end

  context ".configure" do
    subject {
      Evrone::CI::Worker.configure do |c|
        c.run = "local"
        c.docker.image = 'image'
      end
    }
    its(:run)           { should eq :local     }
    its("docker.image") { should eq 'image'    }
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
evrone-ci-worker-0.2.0.pre4 spec/lib/worker/configuration_spec.rb
evrone-ci-worker-0.2.0.pre3 spec/lib/worker/configuration_spec.rb
evrone-ci-worker-0.2.0.pre1 spec/lib/worker/configuration_spec.rb
evrone-ci-worker-0.2.0.pre0 spec/lib/worker/configuration_spec.rb