From f7025518512c0bf8d63f413f7be78347fedee9f4 Mon Sep 17 00:00:00 2001 From: Raphaƫl Pinson Date: Fri, 12 Apr 2013 10:50:24 +0200 Subject: Test target for concat::fragment in dhcp::hosts --- spec/defines/dhcp_hosts_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'spec') diff --git a/spec/defines/dhcp_hosts_spec.rb b/spec/defines/dhcp_hosts_spec.rb index c8face6..f5f44ca 100644 --- a/spec/defines/dhcp_hosts_spec.rb +++ b/spec/defines/dhcp_hosts_spec.rb @@ -255,6 +255,7 @@ describe 'dhcp::hosts' do } } it { should contain_concat__fragment('dhcp.host.My hosts').with( + :target => '/etc/dhcp/hosts.d/1.2.3.4.conf', :content => /fixed-address host1;/ ) } end @@ -273,6 +274,7 @@ describe 'dhcp::hosts' do } } it { should contain_concat__fragment('dhcp.host.My hosts').with( + :target => '/etc/dhcp/hosts.d/1.2.3.4.conf', :content => /foo;\nbar;\n/ ) } end @@ -292,6 +294,7 @@ describe 'dhcp::hosts' do } } it { should contain_concat__fragment('dhcp.host.My hosts').with( + :target => '/etc/dhcp/hosts.d/1.2.3.4.conf', :content => /baz;\n/ ) } end @@ -331,6 +334,7 @@ describe 'dhcp::hosts' do } } it { should contain_concat__fragment('dhcp.host.My hosts').with( + :target => '/etc/dhcp/hosts.d/1.2.3.4.conf', :content => /foo;\nbar;\n/ ) } end @@ -355,7 +359,8 @@ describe 'dhcp::hosts' do :subnet => '1.2.3.4' } } - it { should contain_concat__fragment('dhcp.host.My hosts').with_content( + it { should contain_concat__fragment('dhcp.host.My hosts').with( + :target => '/etc/dhcp/hosts.d/1.2.3.4.conf').with_content( /host host1-eth0 \{\n hardware ethernet 00:11:22:33:44:55;\n fixed-address host1;\n\}/).with_content( /host host1-wlan0 \{\n hardware ethernet 00:aa:bb:44:55:ff;\n fixed-address host1;\n\}/).with_content( /host host2-eth1 \{\n hardware ethernet 00:11:af:33:44:55;\n fixed-address foo\.example\.com;\n opt1;\n\}/) -- cgit v1.2.3