Sha256: 206e30b43ef039d9d25bb73e161a6142b0dc5dbb543e85abcf0c506359143339

Contents?: true

Size: 1.25 KB

Versions: 3

Compression:

Stored size: 1.25 KB

Contents

require "spec_helper"

describe Praegustator do
  describe ".config" do
    subject(:config){Praegustator.config}
    it "returnlog level" do
      config['log_level'].should == 'info'
    end

    it "return knife_location" do
      config['chef']['knife_location'].should == '~/.chef/knife.rb'
    end

    it "return search driver" do
      config['search_driver'].should == 'chef'
    end

    it "return backend" do
      config['spec']['backend'].should == 'serverspec'
    end

    it "return checks dir" do
      config['spec']['checks_dir'].should == 'spec/shared'
    end
  end

  describe ".configure_with" do
    before :each do
     Praegustator.configure_with File.dirname(__FILE__)+"/praegustator/resources/sample/config/praegustator.yml"
    end
    subject(:config){Praegustator.config}
    it "sets log level" do
      config['log_level'].should == 'info'
    end

    it "sets knife_location" do
      config['chef']['knife_location'].should == '.zero-knife.rb'
    end

    it "sets search driver" do
      config['search_driver'].should == 'chef'
    end

    it "sets recipie dir" do
      config['spec']['recipes_dir'].should == 'recipies/'
    end

    it "sets checks dir" do
      config['spec']['checks_dir'].should == 'recipies/checks/'
    end

  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
praegustator-0.3.0 spec/praegustator_spec.rb
praegustator-0.2.0 spec/praegustator_spec.rb
praegustator-0.1.0 spec/praegustator_spec.rb