fix tests for rspec-2.11.0
This commit is contained in:
parent
e3495af21b
commit
e474433342
|
@ -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
|
||||
|
|
3
Gemfile
3
Gemfile
|
@ -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 @@ describe 'sysctl::common' do
|
|||
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 @@ describe 'sysctl::common' do
|
|||
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 @@ describe 'split' do
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue