From 5c4f14e3863033f678ddd500932ffc1b2301411d Mon Sep 17 00:00:00 2001 From: Branan Purvine-Riley Date: Mon, 23 Jul 2012 16:39:37 -0700 Subject: [PATCH] Fix negative tests on rspec 2.11 --- spec/classes/mysql_config_spec.rb | 8 ++------ spec/classes/mysql_init_spec.rb | 4 +--- spec/classes/mysql_java_spec.rb | 4 +--- spec/classes/mysql_python_spec.rb | 4 +--- spec/classes/mysql_ruby_spec.rb | 4 +--- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/spec/classes/mysql_config_spec.rb b/spec/classes/mysql_config_spec.rb index c71d0ca..3f2a5d6 100644 --- a/spec/classes/mysql_config_spec.rb +++ b/spec/classes/mysql_config_spec.rb @@ -209,9 +209,7 @@ describe 'mysql::config' do end it 'should fail' do - expect do - subject - end.should raise_error(Puppet::Error, /Duplicate (declaration|definition)/) + expect { subject }.to raise_error(Puppet::Error, /Duplicate (declaration|definition)/) end end @@ -226,9 +224,7 @@ describe 'mysql::config' do end it 'should fail' do - expect do - subject - end.should raise_error(Puppet::Error, /required when ssl is true/) + expect { subject }.to raise_error(Puppet::Error, /required when ssl is true/) end end diff --git a/spec/classes/mysql_init_spec.rb b/spec/classes/mysql_init_spec.rb index de7cb65..f2b51f8 100644 --- a/spec/classes/mysql_init_spec.rb +++ b/spec/classes/mysql_init_spec.rb @@ -47,9 +47,7 @@ describe 'mysql' do end it 'should fail' do - expect do - subject - end.should raise_error(/Unsupported osfamily: foo/) + expect { subject }.to raise_error(/Unsupported osfamily: foo/) end end diff --git a/spec/classes/mysql_java_spec.rb b/spec/classes/mysql_java_spec.rb index 6a4387f..bd75691 100644 --- a/spec/classes/mysql_java_spec.rb +++ b/spec/classes/mysql_java_spec.rb @@ -47,9 +47,7 @@ describe 'mysql::java' do end it 'should fail' do - expect do - subject - end.should raise_error(/Unsupported osfamily: foo/) + expect { subject }.to raise_error(/Unsupported osfamily: foo/) end end diff --git a/spec/classes/mysql_python_spec.rb b/spec/classes/mysql_python_spec.rb index 2082b30..ecf1fb3 100644 --- a/spec/classes/mysql_python_spec.rb +++ b/spec/classes/mysql_python_spec.rb @@ -47,9 +47,7 @@ describe 'mysql::python' do end it 'should fail' do - expect do - subject - end.should raise_error(/Unsupported osfamily: foo/) + expect { subject }.to raise_error(/Unsupported osfamily: foo/) end end diff --git a/spec/classes/mysql_ruby_spec.rb b/spec/classes/mysql_ruby_spec.rb index f25129d..ceb9e97 100644 --- a/spec/classes/mysql_ruby_spec.rb +++ b/spec/classes/mysql_ruby_spec.rb @@ -55,9 +55,7 @@ describe 'mysql::ruby' do end it 'should fail' do - expect do - subject - end.should raise_error(/Unsupported osfamily: foo/) + expect { subject }.to raise_error(/Unsupported osfamily: foo/) end end