summaryrefslogtreecommitdiff
path: root/spec/functional/resource/git_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/functional/resource/git_spec.rb')
-rw-r--r--spec/functional/resource/git_spec.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/spec/functional/resource/git_spec.rb b/spec/functional/resource/git_spec.rb
index 9d3b82f19e..35da2506e5 100644
--- a/spec/functional/resource/git_spec.rb
+++ b/spec/functional/resource/git_spec.rb
@@ -16,10 +16,10 @@
# limitations under the License.
#
-require 'spec_helper'
-require 'chef/mixin/shell_out'
-require 'tmpdir'
-require 'shellwords'
+require "spec_helper"
+require "chef/mixin/shell_out"
+require "tmpdir"
+require "shellwords"
# Deploy relies heavily on symlinks, so it doesn't work on windows.
describe Chef::Resource::Git do
@@ -129,10 +129,10 @@ E
it "checks out the revision pointed to by the tag commit, not the tag commit itself" do
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(v1_commit)
# also verify the tag commit itself is what we expect as an extra sanity check
- rev = shell_out!('git rev-parse v1.0.0', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ rev = shell_out!("git rev-parse v1.0.0", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(rev).to eq(v1_tag)
end
@@ -140,7 +140,7 @@ E
# this used to fail because we didn't resolve the annotated tag
# properly to the pointed to commit.
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(v1_commit)
copy_git_resource.run_action(:sync)
@@ -166,14 +166,14 @@ E
it "checks out the expected revision ed18" do
basic_git_resource.revision rev_foo
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(rev_foo)
end
it "doesn't update if up-to-date" do
basic_git_resource.revision rev_foo
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(rev_foo)
copy_git_resource.revision rev_foo
@@ -184,7 +184,7 @@ E
it "checks out the expected revision 972d" do
basic_git_resource.revision rev_testing
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(rev_testing)
end
end
@@ -193,13 +193,13 @@ E
let(:basic_git_resource) do
Chef::Resource::Git.new(deploy_directory, run_context).tap do |r|
r.repository origin_repo
- r.revision 'HEAD'
+ r.revision "HEAD"
end
end
it "checks out the expected revision" do
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(rev_head)
end
end
@@ -214,7 +214,7 @@ E
it "checks out HEAD as the default revision" do
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD', :cwd => deploy_directory, :returns => [0]).stdout.strip
+ head_rev = shell_out!("git rev-parse HEAD", :cwd => deploy_directory, :returns => [0]).stdout.strip
expect(head_rev).to eq(rev_head)
end
end
@@ -228,7 +228,7 @@ E
let(:basic_git_resource) do
Chef::Resource::Git.new(deploy_directory, run_context).tap do |r|
r.repository origin_repo
- r.revision 'HEAD'
+ r.revision "HEAD"
end
end
@@ -241,7 +241,7 @@ E
it "checks out the (master) HEAD revision and ignores the tag" do
basic_git_resource.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD',
+ head_rev = shell_out!("git rev-parse HEAD",
:cwd => deploy_directory,
:returns => [0]).stdout.strip
expect(head_rev).to eq(rev_head)
@@ -249,7 +249,7 @@ E
it "checks out the (master) HEAD revision when no revision is specified (ignores tag)" do
git_resource_default_rev.run_action(:sync)
- head_rev = shell_out!('git rev-parse HEAD',
+ head_rev = shell_out!("git rev-parse HEAD",
:cwd => deploy_directory,
:returns => [0]).stdout.strip
expect(head_rev).to eq(rev_head)