From c143078763a70c6df8da5b4f73b265d91c4799f0 Mon Sep 17 00:00:00 2001 From: Matthew Haughton <3flex@users.noreply.github.com> Date: Tue, 19 May 2015 11:55:41 -0400 Subject: [PATCH] spec: update upstream_spec for puppetlabs-concat 2 --- spec/defines/resource_upstream_spec.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/defines/resource_upstream_spec.rb b/spec/defines/resource_upstream_spec.rb index f50d8235f..ec3621ebc 100644 --- a/spec/defines/resource_upstream_spec.rb +++ b/spec/defines/resource_upstream_spec.rb @@ -27,8 +27,7 @@ describe 'basic assumptions' do let :params do default_params end - it { is_expected.to contain_class('concat::setup') } - it { is_expected.to contain_file("/etc/nginx/conf.d/#{title}-upstream.conf") } + it { is_expected.to contain_concat("/etc/nginx/conf.d/#{title}-upstream.conf") } it { is_expected.to contain_concat__fragment("#{title}_upstream_header").with_content(/upstream #{title}/) } it { @@ -96,7 +95,7 @@ context "when #{param[:attr]} is #{param[:value]}" do let :params do default_params.merge({ param[:attr].to_sym => param[:value] }) end - it { is_expected.to contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_mode('0644') } + it { is_expected.to contain_concat("/etc/nginx/conf.d/#{title}-upstream.conf").with_mode('0644') } it { is_expected.to contain_concat__fragment("#{title}_upstream_#{param[:fragment]}") } it param[:title] do lines = catalogue.resource('concat::fragment', "#{title}_upstream_#{param[:fragment]}").send(:parameters)[:content].split("\n") @@ -115,7 +114,7 @@ } ) end - it { is_expected.to contain_file("/etc/nginx/conf.d/#{title}-upstream.conf").with_ensure('absent') } + it { is_expected.to contain_concat("/etc/nginx/conf.d/#{title}-upstream.conf").with_ensure('absent') } end end end