summaryrefslogtreecommitdiff
path: root/spec/unit/puppet/provider/vcsrepo/git_spec.rb
diff options
context:
space:
mode:
authorAaron Stone <aaron@serendipity.cx>2012-10-18 23:31:29 -0700
committerAaron Stone <aaron@serendipity.cx>2012-10-18 23:31:29 -0700
commit5402f4f1dd4b315f14afa671e3c2c236ac9f53ce (patch)
tree5ca2384b8d14d76b249ddaea288824e43fa972d0 /spec/unit/puppet/provider/vcsrepo/git_spec.rb
parent86594324171caf4dc96453ed3a7b56444e48b6d1 (diff)
Remove excess whitespace.
Diffstat (limited to 'spec/unit/puppet/provider/vcsrepo/git_spec.rb')
-rw-r--r--spec/unit/puppet/provider/vcsrepo/git_spec.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/unit/puppet/provider/vcsrepo/git_spec.rb b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
index 240b2b8..7d5d327 100644
--- a/spec/unit/puppet/provider/vcsrepo/git_spec.rb
+++ b/spec/unit/puppet/provider/vcsrepo/git_spec.rb
@@ -24,7 +24,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.expects(:git).with('checkout', '--force', resource.value(:revision))
provider.create
end
- end
+ end
resource_without :revision do
it "should execute 'git clone' and submodule commands" do
provider.expects(:git).with('clone', resource.value(:source), resource.value(:path))
@@ -33,7 +33,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
end
-
+
resource_with :ensure => :bare do
resource_with :revision do
it "should just execute 'git clone --bare'" do
@@ -41,7 +41,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.create
end
end
-
+
resource_without :revision do
it "should just execute 'git clone --bare'" do
provider.expects(:git).with('clone', '--bare', resource.value(:source), resource.value(:path))
@@ -50,7 +50,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
end
-
+
context "when a source is not given" do
resource_with :ensure => :present do
context "when the path does not exist" do
@@ -63,7 +63,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.create
end
end
-
+
context "when the path is a bare repository" do
it "should convert it to a working copy" do
provider.expects(:bare_exists?).returns(true)
@@ -71,7 +71,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.create
end
end
-
+
context "when the path is not a repository" do
it "should raise an exception" do
provider.expects(:path_exists?).returns(true)
@@ -79,7 +79,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
end
-
+
resource_with :ensure => :bare do
context "when the path does not exist" do
it "should execute 'git init --bare'" do
@@ -91,7 +91,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.create
end
end
-
+
context "when the path is a working copy repository" do
it "should convert it to a bare repository" do
provider.expects(:working_copy_exists?).returns(true)
@@ -99,7 +99,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.create
end
end
-
+
context "when the path is not a repository" do
it "should raise an exception" do
expects_directory?(true)
@@ -110,21 +110,21 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
-
+
context 'destroying' do
it "it should remove the directory" do
expects_rm_rf
provider.destroy
end
end
-
+
context "checking the revision property" do
resource_with :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('fetch', 'origin') # FIXME
@@ -134,7 +134,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.revision.should == resource.value(:revision)
end
end
-
+
context "when its SHA is different than the current SHA" do
it "should return the current SHA" do
provider.expects(:git).with('fetch', 'origin') # FIXME
@@ -146,7 +146,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
end
end
end
-
+
context "setting the revision property" do
before do
expects_chdir
@@ -183,9 +183,9 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.expects(:git).with('submodule', 'foreach', 'git', 'submodule', 'update')
provider.revision = resource.value(:revision)
end
- end
+ end
end
-
+
context "updating references" do
it "should use 'git fetch --tags'" do
expects_chdir
@@ -223,7 +223,7 @@ describe_provider :vcsrepo, :git, :resource => {:path => '/tmp/vcsrepo'} do
provider.should_not be_remote_branch_revision
end
end
- end
+ end
end
-
+
end