summaryrefslogtreecommitdiff
path: root/spec/hosts/simple_redhat_spec.rb
diff options
context:
space:
mode:
authorMickaël Canévet <mickael.canevet@camptocamp.com>2014-12-27 10:43:45 +0100
committerMickaël Canévet <mickael.canevet@camptocamp.com>2014-12-27 10:43:45 +0100
commit084e63ac0a96962655f599514f73e8126f90e9e4 (patch)
treeebf97a2e7a769df3a31a577e32b991c3a4ef04a1 /spec/hosts/simple_redhat_spec.rb
parent8b375611b7dec7806bb0e519756cd365e75986e0 (diff)
parent520b5e876c5a31b9f4bf38a3714a125316833dd3 (diff)
Merge pull request #41 from mcanevet/rspec-puppet-facts
Fix unit tests when using future parser
Diffstat (limited to 'spec/hosts/simple_redhat_spec.rb')
-rw-r--r--spec/hosts/simple_redhat_spec.rb99
1 files changed, 0 insertions, 99 deletions
diff --git a/spec/hosts/simple_redhat_spec.rb b/spec/hosts/simple_redhat_spec.rb
deleted file mode 100644
index 42c17c8..0000000
--- a/spec/hosts/simple_redhat_spec.rb
+++ /dev/null
@@ -1,99 +0,0 @@
-require 'spec_helper'
-
-describe 'simple_redhat' do
- let (:facts) { {
- :osfamily => 'RedHat',
- } }
-
- context 'when versions are not specified' do
- let (:facts) { {
- :augeas_lens_dir => :undef,
- :augeas_ruby_version => :undef,
- :augeas_version => :undef,
- :osfamily => 'RedHat',
- } }
-
- it { is_expected.to contain_package('augeas').with(
- :ensure => 'present'
- ) }
- it { is_expected.to contain_package('augeas-libs').with(
- :ensure => 'present'
- ) }
- it { is_expected.to contain_package('ruby-augeas').with(
- :ensure => 'present',
- :name => 'ruby-augeas'
- ) }
- end
-
- context 'when versions are specified' do
- let (:facts) { {
- :osfamily => 'RedHat',
- :augeas_lens_dir => :undef,
- :augeas_version => '1.2.3',
- :augeas_ruby_version => '3.2.1',
- } }
-
- it { is_expected.to contain_package('augeas').with(
- :ensure => '1.2.3'
- ) }
- it { is_expected.to contain_package('augeas-libs').with(
- :ensure => '1.2.3'
- ) }
- it { is_expected.to contain_package('ruby-augeas').with(
- :ensure => '3.2.1',
- :name => 'ruby-augeas'
- ) }
- end
-
- context 'with standard lens_dir' do
- let (:facts) { {
- :augeas_lens_dir => :undef,
- :augeas_ruby_version => :undef,
- :augeas_version => :undef,
- :osfamily => 'RedHat',
- } }
-
- it { is_expected.to contain_file('/usr/share/augeas/lenses').with(
- :ensure => 'directory',
- :purge => 'true',
- :force => 'true',
- :recurse => 'true',
- :recurselimit => 1
- ) }
- it { is_expected.to contain_file('/usr/share/augeas/lenses/dist').with(
- :ensure => 'directory',
- :purge => 'false'
- ) }
- it { is_expected.to contain_file('/usr/share/augeas/lenses/tests').with(
- :ensure => 'directory',
- :purge => 'true',
- :force => 'true'
- ).without(:recurse) }
- end
-
- context 'with a non standard lens_dir' do
- let (:facts) { {
- :augeas_lens_dir => '/opt/augeas/lenses',
- :augeas_ruby_version => :undef,
- :augeas_version => :undef,
- :osfamily => 'RedHat',
- } }
-
- it { is_expected.to contain_file('/opt/augeas/lenses').with(
- :ensure => 'directory',
- :purge => 'true',
- :force => 'true',
- :recurse => 'true',
- :recurselimit => 1
- ) }
- it { is_expected.to contain_file('/opt/augeas/lenses/dist').with(
- :ensure => 'directory',
- :purge => 'false'
- ) }
- it { is_expected.to contain_file('/opt/augeas/lenses/tests').with(
- :ensure => 'directory',
- :purge => 'true',
- :force => 'true'
- ).without(:recurse) }
- end
-end