Skip to content

Commit be493c3

Browse files
committed
Merge pull request #87 from branan/fix_rspec_211
Fix negative tests on rspec 2.11
2 parents 66c17cd + 5c4f14e commit be493c3

File tree

5 files changed

+6
-18
lines changed

5 files changed

+6
-18
lines changed

spec/classes/mysql_config_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,7 @@
209209
end
210210

211211
it 'should fail' do
212-
expect do
213-
subject
214-
end.should raise_error(Puppet::Error, /Duplicate (declaration|definition)/)
212+
expect { subject }.to raise_error(Puppet::Error, /Duplicate (declaration|definition)/)
215213
end
216214

217215
end
@@ -226,9 +224,7 @@
226224
end
227225

228226
it 'should fail' do
229-
expect do
230-
subject
231-
end.should raise_error(Puppet::Error, /required when ssl is true/)
227+
expect { subject }.to raise_error(Puppet::Error, /required when ssl is true/)
232228
end
233229

234230
end

spec/classes/mysql_init_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
end
4848

4949
it 'should fail' do
50-
expect do
51-
subject
52-
end.should raise_error(/Unsupported osfamily: foo/)
50+
expect { subject }.to raise_error(/Unsupported osfamily: foo/)
5351
end
5452
end
5553

spec/classes/mysql_java_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
end
4848

4949
it 'should fail' do
50-
expect do
51-
subject
52-
end.should raise_error(/Unsupported osfamily: foo/)
50+
expect { subject }.to raise_error(/Unsupported osfamily: foo/)
5351
end
5452
end
5553

spec/classes/mysql_python_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@
4747
end
4848

4949
it 'should fail' do
50-
expect do
51-
subject
52-
end.should raise_error(/Unsupported osfamily: foo/)
50+
expect { subject }.to raise_error(/Unsupported osfamily: foo/)
5351
end
5452
end
5553

spec/classes/mysql_ruby_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,7 @@
5555
end
5656

5757
it 'should fail' do
58-
expect do
59-
subject
60-
end.should raise_error(/Unsupported osfamily: foo/)
58+
expect { subject }.to raise_error(/Unsupported osfamily: foo/)
6159
end
6260
end
6361

0 commit comments

Comments
 (0)