Sha256: 2c23538f83e03b3ea8a7c33341ccbceea8b8c91ebe2ff8f9a3f75b2fe37e1eba
Contents?: true
Size: 1.64 KB
Versions: 4
Compression:
Stored size: 1.64 KB
Contents
# # Copyright:: Copyright (c) 2014 Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # require 'spec_helper' require 'chef-dk/cookbook_metadata' describe ChefDK::CookbookMetadata do describe "providing the API required by CookbookOmnifetch" do let(:metadata) { ChefDK::CookbookMetadata.new } it "provides a `from_path` class method" do expect(described_class).to respond_to(:from_path) end it "responds to #cookbook_name" do expect(metadata).to respond_to(:cookbook_name) end it "responds to #version" do expect(metadata).to respond_to(:version) end end describe "when a cookbook is loaded" do let(:cookbook_root) { File.join(fixtures_path, 'example_cookbook') } let(:cookbook) { described_class.from_path(cookbook_root) } it "has a name" do expect(cookbook.name).to eq("example_cookbook") expect(cookbook.cookbook_name).to eq("example_cookbook") end it "has a version" do expect(cookbook.version).to eq("0.1.0") end it "has a map of dependencies" do expect(cookbook.dependencies).to eq({}) end end end
Version data entries
4 entries across 4 versions & 1 rubygems