Permalink
Browse files

fix tests for rspec-2.11.0

  • Loading branch information...
1 parent e3495af commit e474433342386b27fe0b86a8d2b2a1f77797f860 @fungusakafungus fungusakafungus committed with Jul 31, 2012
Showing with 7 additions and 4 deletions.
  1. +2 −0 .travis.yml
  2. +2 −1 Gemfile
  3. +2 −2 spec/classes/sysctl_common_spec.rb
  4. +1 −1 spec/functions/split_spec.rb
View
@@ -11,6 +11,8 @@ notifications:
env:
- PUPPET_VERSION=2.6.14
- PUPPET_VERSION=2.7.12
+ - RSPEC_VERSION=2.9.0
+ - RSPEC_VERSION=2.11.0
matrix:
exclude:
- rvm: 1.9.2
View
@@ -1,7 +1,8 @@
source :rubygems
puppetversion = ENV.key?('PUPPET_VERSION') ? "= #{ENV['PUPPET_VERSION']}" : ['>= 2.7']
+rspecversion = ENV.key?('RSPEC_VERSION') ? "= #{ENV['RSPEC_VERSION']}" : ['>= 2.9']
gem 'rake'
-gem 'rspec'
+gem 'rspec', rspecversion
gem 'puppet', puppetversion
@@ -8,7 +8,7 @@
it 'should fail if the parameter is not contained in the resource' do
expect do
subject.should contain_exec('sysctl/reload').with('foo' => 'bar')
- end.should raise_error(RSpec::Expectations::ExpectationNotMetError)
+ end.to raise_error(RSpec::Expectations::ExpectationNotMetError)
end
it 'should pass if the parameters are contained in the resource' do
subject.should contain_exec('sysctl/reload').with(
@@ -27,7 +27,7 @@
it 'should fail if any of the parameter names are contained in the resource' do
expect do
subject.should contain_exec('sysctl/reload').without(['foo', 'returns'])
- end.should raise_error(RSpec::Expectations::ExpectationNotMetError)
+ end.to raise_error(RSpec::Expectations::ExpectationNotMetError)
end
end
end
@@ -6,6 +6,6 @@
it { should_not run.with_params('foo').and_raise_error(Puppet::DevError) }
it 'something' do
- expect { subject.call('foo') }.should raise_error(Puppet::ParseError)
+ expect { subject.call('foo') }.to raise_error(Puppet::ParseError)
end
end

0 comments on commit e474433

Please sign in to comment.