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(:tmp_dir_name) { should eq 'tmp' } 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 'dmexe/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