From 5402f4f1dd4b315f14afa671e3c2c236ac9f53ce Mon Sep 17 00:00:00 2001 From: Aaron Stone Date: Thu, 18 Oct 2012 23:31:29 -0700 Subject: Remove excess whitespace. --- spec/unit/puppet/provider/vcsrepo/git_spec.rb | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'spec/unit/puppet/provider/vcsrepo/git_spec.rb') 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 -- cgit v1.2.3