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:12:26 -0700
committerBruce Williams <bruce@codefluency.com>2010-03-18 01:12:26 -0700
commit3f36217e58b19664fa065f77e78547f124e254ad (patch)
tree9344936bbb10a158e3e643d81300fa367766055c /spec/unit/puppet/provider/vcsrepo/git_spec.rb
parente1470a239f2d82d2032b179a0eb4052c4c1c4550 (diff)
Rename methods context_with(out)? => context_with\1_resource for clarity
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo/git_spec.rb')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 698687f..ada7e5c 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -3,9 +3,9 @@ require 'pathname'; Pathname.new(__FILE__).realpath.ascend { |x| begin; require
describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
context 'creating' do
- context_with :source do
- context_with :ensure => :present do
- context_with :revision do
+ context_with_resource :source do
+ context_with_resource :ensure => :present do
+ context_with_resource :revision do
it "should execute 'git clone' and 'git reset --hard'" do
provider.expects('git').with('clone', resource.value(:source), resource.value(:path))
expects_chdir
@@ -14,7 +14,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
- context_without :revision do
+ context_without_resource :revision do
it "should just execute 'git clone'" do
provider.expects(:git).with('clone', resource.value(:source), resource.value(:path))
provider.create
@@ -22,15 +22,15 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
- context_with :ensure => :bare do
- context_with :revision do
+ context_with_resource :ensure => :bare do
+ context_with_resource :revision do
it "should just execute 'git clone --bare'" do
subject.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path))
subject.create
end
end
- context_without :revision do
+ context_without_resource :revision do
it "should just execute 'git clone --bare'" do
subject.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path))
subject.create
@@ -40,7 +40,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
context "when a source is not given" do
- context_with :ensure => :present do
+ context_with_resource :ensure => :present do
context "when the path does not exist" do
it "should execute 'git init'" do
expects_mkdir
@@ -69,7 +69,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
- context_with :ensure => :bare do
+ context_with_resource :ensure => :bare do
context "when the path does not exist" do
it "should execute 'git init --bare'" do
expects_chdir
@@ -107,7 +107,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
context "checking the revision property" do
- context_with :revision do
+ context_with_resource :revision do
before do
expects_chdir
provider.expects(:git).with('rev-parse', 'HEAD').returns('currentsha')