diff options
author | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2014-12-09 15:43:05 +0100 |
---|---|---|
committer | Raphaël Pinson <raphael.pinson@camptocamp.com> | 2014-12-09 15:43:05 +0100 |
commit | 1d1bab299473365788deef074e50167c1e082c0f (patch) | |
tree | b082c89a824e1e87f619827baf07260dd6dd4963 /spec/defines | |
parent | 2ab024ab14bdf831233d727f55d0a3cc0cf5e5b3 (diff) |
Convert specs to rspec3 syntax
Diffstat (limited to 'spec/defines')
-rw-r--r-- | spec/defines/augeas_lens_spec.rb | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/spec/defines/augeas_lens_spec.rb b/spec/defines/augeas_lens_spec.rb index cd9d515..5318d8d 100644 --- a/spec/defines/augeas_lens_spec.rb +++ b/spec/defines/augeas_lens_spec.rb @@ -12,7 +12,7 @@ describe 'augeas::lens' do context 'when no lens_source is passed' do it 'should error' do expect { - should contain_file('/usr/share/augeas/lenses/foo.aug') + is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') }.to raise_error(Puppet::Error, /Must pass lens_source/) end end @@ -22,10 +22,10 @@ describe 'augeas::lens' do :lens_source => '/tmp/foo.aug', } } - it { should contain_file('/usr/share/augeas/lenses/foo.aug') } - it { should contain_exec('Typecheck lens foo') } - it { should_not contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } - it { should_not contain_exec('Test lens foo') } + it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_exec('Typecheck lens foo') } + it { is_expected.not_to contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } + it { is_expected.not_to contain_exec('Test lens foo') } end context 'when lens_source and test_source are passed' do @@ -34,10 +34,10 @@ describe 'augeas::lens' do :test_source => '/tmp/test_foo.aug', } } - it { should contain_file('/usr/share/augeas/lenses/foo.aug') } - it { should contain_exec('Typecheck lens foo') } - it { should contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } - it { should contain_exec('Test lens foo') } + it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_exec('Typecheck lens foo') } + it { is_expected.to contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } + it { is_expected.to contain_exec('Test lens foo') } end context 'when stock_since is passed and augeas is older' do @@ -55,8 +55,8 @@ describe 'augeas::lens' do :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', } } - it { should contain_file('/usr/share/augeas/lenses/foo.aug') } - it { should contain_exec('Typecheck lens foo') } + it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_exec('Typecheck lens foo') } end context 'when stock_since is passed and augeas is newer' do @@ -74,7 +74,7 @@ describe 'augeas::lens' do :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', } } - it { should_not contain_file('/usr/share/augeas/lenses/foo.aug') } - it { should_not contain_exec('Typecheck lens foo') } + it { is_expected.not_to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.not_to contain_exec('Typecheck lens foo') } end end |