summaryrefslogtreecommitdiff
path: root/spec/unit
diff options
context:
space:
mode:
authorBruce Williams <bruce@codefluency.com>2010-03-18 01:18:13 -0700
committerBruce Williams <bruce@codefluency.com>2010-03-18 01:18:13 -0700
commite7d7e2217d54d8c87dd9897f4fe1bfbdb5038d02 (patch)
tree62b31d53cc67bd08ed7cd0d5de384e7be7c31446 /spec/unit
parent3f36217e58b19664fa065f77e78547f124e254ad (diff)
downloadpuppet-vcsrepo-e7d7e2217d54d8c87dd9897f4fe1bfbdb5038d02.tar.gz
puppet-vcsrepo-e7d7e2217d54d8c87dd9897f4fe1bfbdb5038d02.tar.bz2
Fix bad context nesting
Diffstat (limited to 'spec/unit')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb83
1 files changed, 42 insertions, 41 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index ada7e5c..aef3e91 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -98,53 +98,54 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
end
-
- context 'destroying' do
- it "it should remove the directory" do
- expects_rm_rf
- provider.destroy
- end
+
+ end
+
+ context 'destroying' do
+ it "it should remove the directory" do
+ expects_rm_rf
+ provider.destroy
end
-
- context "checking the revision property" do
- context_with_resource :revision do
- before do
- expects_chdir
- provider.expects(:git).with('rev-parse', 'HEAD').returns('currentsha')
- end
-
- context "when its SHA is not different than the current SHA" do
- it "should return the ref" do
- provider.expects(:git).with('rev-parse', resource.value(:revision)).returns('currentsha')
- provider.revision.should == resource.value(:revision)
- end
+ end
+
+ context "checking the revision property" do
+ context_with_resource :revision do
+ before do
+ expects_chdir
+ provider.expects(:git).with('rev-parse', 'HEAD').returns('currentsha')
+ end
+
+ context "when its SHA is not different than the current SHA" do
+ it "should return the ref" do
+ provider.expects(:git).with('rev-parse', resource.value(:revision)).returns('currentsha')
+ provider.revision.should == resource.value(:revision)
end
-
- context "when its SHA is different than the current SHA" do
- it "should return the current SHA" do
- provider.expects(:git).with('rev-parse', resource.value(:revision)).returns('othersha')
- provider.revision.should == 'currentsha'
- end
+ end
+
+ context "when its SHA is different than the current SHA" do
+ it "should return the current SHA" do
+ provider.expects(:git).with('rev-parse', resource.value(:revision)).returns('othersha')
+ provider.revision.should == 'currentsha'
end
end
end
-
- context "setting the revision property" do
- it "should use 'git fetch' and 'git reset'" do
- expects_chdir
- provider.expects('git').with('fetch', 'origin')
- provider.expects('git').with('reset', '--hard', 'carcar')
- provider.revision = 'carcar'
- end
+ end
+
+ context "setting the revision property" do
+ it "should use 'git fetch' and 'git reset'" do
+ expects_chdir
+ provider.expects('git').with('fetch', 'origin')
+ provider.expects('git').with('reset', '--hard', 'carcar')
+ provider.revision = 'carcar'
end
-
- context "updating references" do
- it "should use 'git fetch --tags'" do
- expects_chdir
- provider.expects('git').with('fetch', '--tags', 'origin')
- provider.update_references
- end
+ end
+
+ context "updating references" do
+ it "should use 'git fetch --tags'" do
+ expects_chdir
+ provider.expects('git').with('fetch', '--tags', 'origin')
+ provider.update_references
end
-
end
+
end