Sha256: d7d7b961613c1b66c5b8615fa21b4d94cfc043a394a9352b4f763e53a10b5310

Contents?: true

Size: 804 Bytes

Versions: 2

Compression:

Stored size: 804 Bytes

Contents

require 'spec_helper'
require 'hibachi/configuration'

module Hibachi
  describe Configuration do
    subject { double 'Hibachi' }

    before do
      subject.class_eval { include Configuration }
    end

    it "sets configuration" do
      subject.configure { |c| c.run_in_background = true }
      expect(subject.config.run_in_background).to eq(true)
    end

    it "returns configuration" do
      expect(subject.config.chef_json_path).to match(/chef\.json\Z/)
      expect(subject.config.chef_dir).to_not be_nil
      expect(subject.config.log_path).to match(/hibachi\.log\Z/)
      expect(subject.config.run_in_background).to eq(false)
    end

    after do
      subject.configure { |c| c.run_in_background = false }
      expect(subject.config.run_in_background).to eq(false)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
hibachi-0.0.1 spec/hibachi/configuration_spec.rb
hibachi-0.0.1.pre spec/hibachi/configuration_spec.rb