File: environment_spec.rb

package info (click to toggle)
ruby-rspec-puppet 2.9.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,416 kB
  • sloc: ruby: 6,661; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 640 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require 'spec_helper'

describe 'facts.acme.com' do
  context 'without an explicit environment setting' do
    it { should contain_file('environment').with_path('rp_env') }
  end
  # Broken on ~> 3.8.5 since PUP-5522
  context 'when specifying an explicit environment', :unless => (Puppet.version >= '3.8.5' && Puppet.version.to_i < 4) do
    let(:environment) { 'test_env' }
    it { should contain_file('environment').with_path('test_env') }
    it { should contain_file('conditional_file') }
  end

  context 'test' do
    let(:environment) { :production }
    it { should contain_file('environment').with_path('production') }
  end
end