Skip to content

Commit

Permalink
'subject' method no longer exists in rspec-puppet.
Browse files Browse the repository at this point in the history
Fixes the rspec tests as documented in rodjek/rspec-puppet#235 .
razorsedge committed Feb 7, 2015
1 parent 2bd6ca9 commit eadb265
Showing 14 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions spec/classes/network_global_spec.rb
Original file line number Diff line number Diff line change
@@ -33,7 +33,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[network.sysconfig] with correct contents' do
verify_contents(subject, 'network.sysconfig', [
verify_contents(catalogue, 'network.sysconfig', [
'NETWORKING=yes',
'NETWORKING_IPV6=no',
'HOSTNAME=localhost.localdomain',
@@ -57,7 +57,7 @@
}
end
it 'should contain File[network.sysconfig] with correct contents' do
verify_contents(subject, 'network.sysconfig', [
verify_contents(catalogue, 'network.sysconfig', [
'NETWORKING=yes',
'NETWORKING_IPV6=no',
'HOSTNAME=myHostname',
6 changes: 3 additions & 3 deletions spec/defines/network_alias_range_spec.rb
Original file line number Diff line number Diff line change
@@ -66,7 +66,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth99-range3] with required contents' do
verify_contents(subject, 'ifcfg-eth99-range3', [
verify_contents(catalogue, 'ifcfg-eth99-range3', [
'IPADDR_START=1.2.3.99',
'IPADDR_END=1.2.3.200',
'CLONENUM_START=3',
@@ -98,7 +98,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond7-range9] with required contents' do
verify_contents(subject, 'ifcfg-bond7-range9', [
verify_contents(catalogue, 'ifcfg-bond7-range9', [
'IPADDR_START=1.2.3.3',
'IPADDR_END=1.2.3.4',
'CLONENUM_START=9',
@@ -148,7 +148,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth8-range9] with required contents' do
verify_contents(subject, 'ifcfg-eth8-range9', [
verify_contents(catalogue, 'ifcfg-eth8-range9', [
'IPADDR_START=1.2.3.3',
'IPADDR_END=1.2.3.4',
'CLONENUM_START=9',
4 changes: 2 additions & 2 deletions spec/defines/network_alias_spec.rb
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond2:1] with required contents' do
verify_contents(subject, 'ifcfg-bond2:1', [
verify_contents(catalogue, 'ifcfg-bond2:1', [
'DEVICE=bond2:1',
'BOOTPROTO=none',
'ONPARENT=yes',
@@ -81,7 +81,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond3:2] with required contents' do
verify_contents(subject, 'ifcfg-bond3:2', [
verify_contents(catalogue, 'ifcfg-bond3:2', [
'DEVICE=bond3:2',
'BOOTPROTO=none',
'ONPARENT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bond_bridge_spec.rb
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond0] with required contents' do
verify_contents(subject, 'ifcfg-bond0', [
verify_contents(catalogue, 'ifcfg-bond0', [
'DEVICE=bond0',
'BOOTPROTO=none',
'ONBOOT=yes',
@@ -115,7 +115,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond0] with required contents' do
verify_contents(subject, 'ifcfg-bond0', [
verify_contents(catalogue, 'ifcfg-bond0', [
'DEVICE=bond0',
'BOOTPROTO=none',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bond_dynamic_spec.rb
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond2] with required contents' do
verify_contents(subject, 'ifcfg-bond2', [
verify_contents(catalogue, 'ifcfg-bond2', [
'DEVICE=bond2',
'BOOTPROTO=dhcp',
'ONBOOT=yes',
@@ -114,7 +114,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond2] with required contents' do
verify_contents(subject, 'ifcfg-bond2', [
verify_contents(catalogue, 'ifcfg-bond2', [
'DEVICE=bond2',
'BOOTPROTO=dhcp',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bond_slave_spec.rb
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth1] with required contents' do
verify_contents(subject, 'ifcfg-eth1', [
verify_contents(catalogue, 'ifcfg-eth1', [
'DEVICE=eth1',
'HWADDR=fe:fe:fe:aa:aa:a1',
'MASTER=bond0',
@@ -71,7 +71,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth3] with required contents' do
verify_contents(subject, 'ifcfg-eth3', [
verify_contents(catalogue, 'ifcfg-eth3', [
'DEVICE=eth3',
'HWADDR=ef:ef:ef:ef:ef:ef',
'MASTER=bond0',
4 changes: 2 additions & 2 deletions spec/defines/network_bond_static_spec.rb
Original file line number Diff line number Diff line change
@@ -52,7 +52,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond0] with required contents' do
verify_contents(subject, 'ifcfg-bond0', [
verify_contents(catalogue, 'ifcfg-bond0', [
'DEVICE=bond0',
'BOOTPROTO=none',
'ONBOOT=yes',
@@ -137,7 +137,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-bond0] with required contents' do
verify_contents(subject, 'ifcfg-bond0', [
verify_contents(catalogue, 'ifcfg-bond0', [
'DEVICE=bond0',
'BOOTPROTO=none',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bridge_dynamic_spec.rb
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=dhcp',
'ONBOOT=yes',
@@ -84,7 +84,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=bootp',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bridge_spec.rb
Original file line number Diff line number Diff line change
@@ -46,7 +46,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=none',
'ONBOOT=yes',
@@ -83,7 +83,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=none',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_bridge_static_spec.rb
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=static',
'ONBOOT=yes',
@@ -109,7 +109,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-br1] with required contents' do
verify_contents(subject, 'ifcfg-br1', [
verify_contents(catalogue, 'ifcfg-br1', [
'DEVICE=br1',
'BOOTPROTO=static',
'ONBOOT=no',
4 changes: 2 additions & 2 deletions spec/defines/network_if_bridge_spec.rb
Original file line number Diff line number Diff line change
@@ -37,7 +37,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth1] with required contents' do
verify_contents(subject, 'ifcfg-eth1', [
verify_contents(catalogue, 'ifcfg-eth1', [
'DEVICE=eth1',
'BOOTPROTO=none',
'ONBOOT=yes',
@@ -74,7 +74,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth1] with required contents' do
verify_contents(subject, 'ifcfg-eth1', [
verify_contents(catalogue, 'ifcfg-eth1', [
'DEVICE=eth1',
'BOOTPROTO=none',
'ONBOOT=no',
6 changes: 3 additions & 3 deletions spec/defines/network_if_dynamic_spec.rb
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth99] with required contents' do
verify_contents(subject, 'ifcfg-eth99', [
verify_contents(catalogue, 'ifcfg-eth99', [
'DEVICE=eth99',
'BOOTPROTO=dhcp',
'HWADDR=ff:aa:ff:aa:ff:aa',
@@ -74,7 +74,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth99] with required contents' do
verify_contents(subject, 'ifcfg-eth99', [
verify_contents(catalogue, 'ifcfg-eth99', [
'DEVICE=eth99',
'BOOTPROTO=bootp',
'HWADDR=ef:ef:ef:ef:ef:ef',
@@ -108,7 +108,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth45.302] with required contents' do
verify_contents(subject, 'ifcfg-eth45.302', [
verify_contents(catalogue, 'ifcfg-eth45.302', [
'DEVICE=eth45.302',
'BOOTPROTO=dhcp',
'HWADDR=bb:cc:bb:cc:bb:cc',
6 changes: 3 additions & 3 deletions spec/defines/network_if_static_spec.rb
Original file line number Diff line number Diff line change
@@ -39,7 +39,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth1] with required contents' do
verify_contents(subject, 'ifcfg-eth1', [
verify_contents(catalogue, 'ifcfg-eth1', [
'DEVICE=eth1',
'BOOTPROTO=none',
'HWADDR=fe:fe:fe:aa:aa:aa',
@@ -87,7 +87,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth1] with required contents' do
verify_contents(subject, 'ifcfg-eth1', [
verify_contents(catalogue, 'ifcfg-eth1', [
'DEVICE=eth1',
'BOOTPROTO=none',
'HWADDR=ef:ef:ef:ef:ef:ef',
@@ -133,7 +133,7 @@
:notify => 'Service[network]'
)}
it 'should contain File[ifcfg-eth6.203] with required contents' do
verify_contents(subject, 'ifcfg-eth6.203', [
verify_contents(catalogue, 'ifcfg-eth6.203', [
'DEVICE=eth6.203',
'BOOTPROTO=none',
'HWADDR=bb:cc:bb:cc:bb:cc',
4 changes: 2 additions & 2 deletions spec/defines/network_route_spec.rb
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
:path => '/etc/sysconfig/network-scripts/route-eth1'
)}
it 'should contain File[route-eth1] with contents "ADDRESS0=192.168.2.1\nNETMASK0=255.255.255.1\nGATEWAY0=192.168.1.2"' do
verify_contents(subject, 'route-eth1', [
verify_contents(catalogue, 'route-eth1', [
'ADDRESS0=192.168.2.1',
'NETMASK0=255.255.255.1',
'GATEWAY0=192.168.1.2',
@@ -47,7 +47,7 @@
:path => '/etc/sysconfig/network-scripts/route-eth2'
)}
it 'should contain File[route-eth2] with contents "ADDRESS0=192.168.2.0\nADDRESS1=10.0.0.0\nNETMASK0=255.255.255.0\nNETMASK1=255.0.0.0\nGATEWAY0=192.168.1.1\nGATEWAY1=10.0.0.1"' do
verify_contents(subject, 'route-eth2', [
verify_contents(catalogue, 'route-eth2', [
'ADDRESS0=192.168.2.0',
'ADDRESS1=10.0.0.0',
'NETMASK0=255.255.255.0',

0 comments on commit eadb265

Please sign in to comment.