summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2012-10-19 01:25:19 -0700
committerAaron Stone <aaron@serendipity.cx>2012-10-19 01:25:19 -0700
commit72df8ecb489c13a0bf7bdb78455e6d523404dd8b (patch)
treea679f32dcd76aaac2b3e37a7ff0fc4de0d593f93 /spec/unit/puppet/provider/vcsrepo
parent821c66fe76056784f84376e5beb4d2de629998ed (diff)
downloadpuppet-vcsrepo-72df8ecb489c13a0bf7bdb78455e6d523404dd8b.tar.gz
puppet-vcsrepo-72df8ecb489c13a0bf7bdb78455e6d523404dd8b.tar.bz2
Dummy provider raises an exception if it is used. Tests to prove it.
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/dummy_spec.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/dummy_spec.rb b/spec/unit/puppet/provider/vcsrepo/dummy_spec.rb
new file mode 100644
index 0000000..a945888
--- /dev/null
+++ b/spec/unit/puppet/provider/vcsrepo/dummy_spec.rb
@@ -0,0 +1,17 @@
+require 'spec_helper'
+
+describe_provider :vcsrepo, :dummy, :resource => {:path => '/tmp/vcsrepo'} do
+
+ context 'dummy' do
+ resource_with :source do
+ resource_with :ensure => :present do
+ context "with nothing doing", :resource => {:revision => 'foo'} do
+ it "should raise an exception" do
+ proc { provider.working_copy_exists? }.should raise_error(RuntimeError)
+ end
+ end
+ end
+ end
+ end
+
+end