Sha256: d67ec2c617d1a98b9674ab17049251cd3b52c0a28672cb77e67d254dced4159a

Contents?: true

Size: 1.08 KB

Versions: 4

Compression:

Stored size: 1.08 KB

Contents

#
# Cookbook:: <%= cookbook_name %>
# Spec:: default
#
<%= license_description('#') %>

require 'spec_helper'

describe '<%= cookbook_name %>::<%= recipe_name %>' do
  context 'When all attributes are default, on Ubuntu 16.04' do
    let(:chef_run) do
      # for a complete list of available platforms and versions see:
      # https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
      runner = ChefSpec::ServerRunner.new(platform: 'ubuntu', version: '16.04')
      runner.converge(described_recipe)
    end

    it 'converges successfully' do
      expect { chef_run }.to_not raise_error
    end
  end

  context 'When all attributes are default, on CentOS 7.4.1708' do
    let(:chef_run) do
      # for a complete list of available platforms and versions see:
      # https://github.com/customink/fauxhai/blob/master/PLATFORMS.md
      runner = ChefSpec::ServerRunner.new(platform: 'centos', version: '7.4.1708')
      runner.converge(described_recipe)
    end

    it 'converges successfully' do
      expect { chef_run }.to_not raise_error
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
chef-dk-2.6.2 lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb
chef-dk-2.6.1 lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb
chef-dk-2.5.13 lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb
chef-dk-2.5.3 lib/chef-dk/skeletons/code_generator/templates/default/recipe_spec.rb.erb