summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorJon Fautley <jon.fautley@fil.com>2014-10-29 10:59:58 +0000
committerJon Fautley <jon.fautley@fil.com>2014-10-29 10:59:58 +0000
commit9cef7c46c98153affbb3cd02e4a26afb43664e6d (patch)
tree9093163f008fadf31c7766afd099198289f5bc4d /spec/unit/puppet/provider/vcsrepo
parentf40255377ce41653d69f0b91c5b1a8f7d36883c1 (diff)
downloadpuppet-vcsrepo-9cef7c46c98153affbb3cd02e4a26afb43664e6d.tar.gz
puppet-vcsrepo-9cef7c46c98153affbb3cd02e4a26afb43664e6d.tar.bz2
Rework spec tests to support new execution method
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/cvs_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb b/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
index f5eebd9..b146d70 100644
--- a/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/cvs_spec.rb
@@ -23,14 +23,14 @@ describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do
resource[:source] = ':ext:source@example.com:/foo/bar'
resource[:revision] = 'an-unimportant-value'
expects_chdir('/tmp')
- provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-r', 'an-unimportant-value', '-d', 'test', 'bar')
+ Puppet::Util::Execution.expects(:execute).with([:cvs, '-d', resource.value(:source), 'checkout', '-r', 'an-unimportant-value', '-d', 'test', 'bar'], :custom_environment => {})
provider.create
end
it "should just execute 'cvs checkout' without a revision" do
resource[:source] = ':ext:source@example.com:/foo/bar'
resource.delete(:revision)
- provider.expects(:cvs).with('-d', resource.value(:source), 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source)))
+ Puppet::Util::Execution.expects(:execute).with([:cvs, '-d', resource.value(:source), 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))], :custom_environment => {})
provider.create
end
@@ -39,7 +39,7 @@ describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do
resource[:source] = ':ext:source@example.com:/foo/bar'
resource[:compression] = '3'
resource.delete(:revision)
- provider.expects(:cvs).with('-d', resource.value(:source), '-z', '3', 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source)))
+ Puppet::Util::Execution.expects(:execute).with([:cvs, '-d', resource.value(:source), '-z', '3', 'checkout', '-d', File.basename(resource.value(:path)), File.basename(resource.value(:source))], :custom_environment => {})
provider.create
end
end
@@ -48,7 +48,7 @@ describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do
context "when a source is not given" do
it "should execute 'cvs init'" do
resource.delete(:source)
- provider.expects(:cvs).with('-d', resource.value(:path), 'init')
+ Puppet::Util::Execution.expects(:execute).with([:cvs, '-d', resource.value(:path), 'init'], :custom_environment => {})
provider.create
end
end
@@ -107,7 +107,7 @@ describe Puppet::Type.type(:vcsrepo).provider(:cvs_provider) do
it "should use 'cvs update -dr'" do
expects_chdir
- provider.expects(:cvs).with('update', '-dr', @tag, '.')
+ Puppet::Util::Execution.expects(:execute).with([:cvs, 'update', '-dr', @tag, '.'], :custom_environment => {})
provider.revision = @tag
end
end