Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
Not sure why but this did the trick :
rodjek/rspec-puppet#205 (comment)
  • Loading branch information
txaj committed Apr 23, 2015
1 parent 5ab404d commit fe119af
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion spec/classes/collectd_init_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
end

it 'should fail' do
expect { subject }.to raise_error(/foo is not supported/)
should compile.and_raise_error(/foo is not supported/)
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_disk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{:disks => 'sda'}
end
it 'Will raise an error about :disks being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_filecount_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
{:directories => '/var/spool/postfix/active'}
end
it 'Will raise an error about :directories being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_interface_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{:interfaces => 'eth0'}
end
it 'Will raise an error about :interfaces being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_iptables_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{:chains => ['nat','In_SSH']}
end
it 'Will raise an error about :chains being an Array' do
expect {should}.to raise_error(Puppet::Error,/Array/)
should compile.and_raise_error(/Array/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_irq_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
{:irqs => '90,91,92'}
end
it 'Will raise an error about :irqs being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/collectd_plugin_tcpconns_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
{:localports => '22'}
end
it 'Will raise an error about :localports being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end

Expand All @@ -57,7 +57,7 @@
{:remoteports => '22'}
end
it 'Will raise an error about :remoteports being a String' do
expect {should}.to raise_error(Puppet::Error,/String/)
should compile.and_raise_error(/String/)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/collectd_plugin_unixsock_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{:socketfile => 'var/run/socket'}
end
it 'Will raise an error about :socketfile' do
expect {should}.to raise_error(Puppet::Error,/absolute path/)
should compile.and_raise_error(/absolute path/)
end
end
end
Expand Down

0 comments on commit fe119af

Please sign in to comment.