summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo/git_spec.rb
diff options
context:
space:
mode:
authorBruce Williams <bruce@codefluency.com>2010-03-18 01:02:02 -0700
committerBruce Williams <bruce@codefluency.com>2010-03-18 01:02:02 -0700
commitaf86e9ba814926f9ee236aabc2ca905b5668af70 (patch)
treecc7d51046dbe0421b8f70bc1f1cca006a994fc2c /spec/unit/puppet/provider/vcsrepo/git_spec.rb
parentdfb28337ce3c0743ed17ed21f5bab7e1692144bf (diff)
Subversion to use provider example group API for specs
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo/git_spec.rb')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 2d55451..698687f 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -45,8 +45,8 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
it "should execute 'git init'" do
expects_mkdir
expects_chdir
+ expects_directory?(false)
provider.expects(:bare_exists?).returns(false)
- File.expects(:directory?).with(resource.value(:path)).returns(false)
provider.expects(:git).with('init')
provider.create
end
@@ -62,7 +62,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context "when the path is not a repository" do
it "should raise an exception" do
- File.expects(:directory?).with(resource.value(:path)).returns(true)
+ expects_directory?(true)
provider.expects(:bare_exists?).returns(false)
proc { provider.create }.should raise_error(Puppet::Error)
end
@@ -74,7 +74,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
it "should execute 'git init --bare'" do
expects_chdir
expects_mkdir
- File.expects(:directory?).with(resource.value(:path)).returns(false)
+ expects_directory?(false)
provider.expects(:working_copy_exists?).returns(false)
provider.expects(:git).with('init', '--bare')
provider.create
@@ -91,7 +91,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context "when the path is not a repository" do
it "should raise an exception" do
- File.expects(:directory?).with(resource.value(:path)).returns(true)
+ expects_directory?(true)
provider.expects(:working_copy_exists?).returns(false)
proc { provider.create }.should raise_error(Puppet::Error)
end
@@ -101,7 +101,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context 'destroying' do
it "it should remove the directory" do
- FileUtils.expects(:rm_rf).with(resource.value(:path))
+ expects_rm_rf
provider.destroy
end
end