From 520b5e876c5a31b9f4bf38a3714a125316833dd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20Can=C3=A9vet?= Date: Mon, 22 Dec 2014 18:34:19 +0100 Subject: Fix unit tests when using future parser --- spec/hosts/with_lens_spec.rb | 66 -------------------------------------------- 1 file changed, 66 deletions(-) delete mode 100644 spec/hosts/with_lens_spec.rb (limited to 'spec/hosts/with_lens_spec.rb') diff --git a/spec/hosts/with_lens_spec.rb b/spec/hosts/with_lens_spec.rb deleted file mode 100644 index e0f5dff..0000000 --- a/spec/hosts/with_lens_spec.rb +++ /dev/null @@ -1,66 +0,0 @@ -require 'spec_helper' - -describe 'with_lens' do - let (:facts) { { - :osfamily => 'RedHat', - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } } - - context 'when lens_source is passed' do - let (:facts) { { - :osfamily => 'RedHat', - :augeas_lens_source => '/tmp/foo.aug', - :augeas_stock_since => :undef, - :augeas_test_source => :undef, - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } } - - 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 - let (:facts) { { - :osfamily => 'RedHat', - :augeas_lens_source => '/tmp/foo.aug', - :augeas_test_source => '/tmp/test_foo.aug', - :augeas_stock_since => :undef, - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } } - - 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 - let (:facts) { { - :osfamily => 'RedHat', - :augeas_lens_source => '/tmp/foo.aug', - :augeas_stock_since => '1.2.3', - :augeasversion => '1.0.0', - :augeas_test_source => :undef, - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } } - - 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 - let (:facts) { { - :osfamily => 'RedHat', - :augeas_lens_source => '/tmp/foo.aug', - :augeas_stock_since => '1.2.3', - :augeasversion => '1.5.0', - :augeas_test_source => :undef, - :path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', - } } - - 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 -- cgit v1.2.3