diff options
author | Thom May <thom@chef.io> | 2016-01-13 09:50:23 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-13 09:50:23 +0000 |
commit | 0e4b96f3414ef7d9599c70f2661bea8c2037aad5 (patch) | |
tree | 5e9b9424ad5b7e320f187ebd020a216bbdb5bf68 /spec/functional/resource/git_spec.rb | |
parent | 556e5f2d78b5c6de2f34d8dd655ee515ff317296 (diff) | |
download | chef-tm/string_literals.tar.gz |
Use double quotes by defaulttm/string_literals
This is an entirely mechanically generated (rubocop -a) change, to go
along with chef/chefstyle#5 . We should pick something and use it
consistently, and my opinion is that double quotes are the appropriate
thing.
Diffstat (limited to 'spec/functional/resource/git_spec.rb')
-rw-r--r-- | spec/functional/resource/git_spec.rb | 32 |
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) |