Sha256: 129deef55443dadc5095e77c449dfb9c4d6be51775811e4c6e7673400403372d

Contents?: true

Size: 1.04 KB

Versions: 2

Compression:

Stored size: 1.04 KB

Contents

require 'foodtaster/config'

describe Foodtaster::Config do
  context 'default options' do
    subject { described_class.new }

    its(:log_level)      { should == :warn }
    its(:drb_port)       { should == 35672 }
    its(:vagrant_binary) { should == 'vagrant' }
    its(:shutdown_vms)   { should == false }
    its(:skip_rollback)  { should == false }
    its(:start_server)   { should == true }
  end

  context 'option overrides' do
    subject do
      described_class.new
    end

    before(:each) do
      subject.configure do |conf|
        conf.log_level = :debug
        conf.drb_port = 31415
        conf.vagrant_binary = '/some/vagrant'
        conf.shutdown_vms = true
        conf.skip_rollback = true
        conf.start_server = false
      end
    end

    its(:log_level)      { should == :debug }
    its(:drb_port)       { should == 31415 }
    its(:vagrant_binary) { should == '/some/vagrant' }
    its(:shutdown_vms)   { should == true }
    its(:skip_rollback)  { should == true }
    its(:start_server)   { should == false }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
foodtaster-0.0.10 spec/foodtaster/config_spec.rb
foodtaster-0.0.9 spec/foodtaster/config_spec.rb