diff options
author | Hunter Haugen <hunter@puppetlabs.com> | 2014-07-03 11:17:06 -0700 |
---|---|---|
committer | Hunter Haugen <hunter@puppetlabs.com> | 2014-07-03 11:17:06 -0700 |
commit | 4592bfd59cd5d4795069798a14b483e16c98c1ff (patch) | |
tree | 85b49fd0180f15e0e28576c12a9edb475b054333 /spec/acceptance | |
parent | b9f404be95d751f607651abed759aab9492435bc (diff) | |
parent | 3ad5203b34c068101d8d47bf70259443e657a4ca (diff) |
Merge pull request #189 from petems/MODULES-1014-add_beaker_test_noop
(MODULES-1014) Add rspec for noop mode
Diffstat (limited to 'spec/acceptance')
-rw-r--r-- | spec/acceptance/remove_repo_spec_noop.rb | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/spec/acceptance/remove_repo_spec_noop.rb b/spec/acceptance/remove_repo_spec_noop.rb new file mode 100644 index 0000000..154f25a --- /dev/null +++ b/spec/acceptance/remove_repo_spec_noop.rb @@ -0,0 +1,31 @@ +require 'spec_helper_acceptance' + +tmpdir = default.tmpdir('vcsrepo') + +describe 'does not remove a repo if noop' do + it 'creates a blank repo' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/testrepo_noop_deleted": + ensure => present, + provider => git, + } + EOS + apply_manifest(pp, :catch_failures => true) + end + + it 'does not remove a repo if noop' do + pp = <<-EOS + vcsrepo { "#{tmpdir}/testrepo_noop_deleted": + ensure => absent, + provider => git, + force => true, + } + EOS + + apply_manifest(pp, :catch_failures => true, :noop => true, :verbose => false) + end + + describe file("#{tmpdir}/testrepo_noop_deleted") do + it { should be_directory } + end +end |