Sha256: 2addc3253cb7570f7c8f03e64c01eac087840490b6e593398c3285a4a91d44a1

Contents?: true

Size: 710 Bytes

Versions: 8

Compression:

Stored size: 710 Bytes

Contents

require 'spec_helper'

describe Berkshelf::Chef::Cookbook::Chefignore do
  describe "ClassMethods" do
    subject { described_class }

    describe "::find_relative_to" do
      let(:path) { tmp_path.join('chefignore-test') }
      before(:each) { FileUtils.mkdir_p(path) }

      it "finds a chefignore file in a 'cookbooks' directory relative to the given path" do
        FileUtils.touch(path.join('chefignore'))
        subject.find_relative_to(path)
      end

      it "finds a chefignore file relative to the given path" do
        FileUtils.mkdir_p(path.join('cookbooks'))
        FileUtils.touch(path.join('cookbooks', 'chefignore'))
        subject.find_relative_to(path)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
berkshelf-1.4.6 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.5 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.4 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.3 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.2 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.1 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.0 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb
berkshelf-1.4.0.rc1 spec/unit/berkshelf/chef/cookbook/chefignore_spec.rb