diff options
author | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2016-01-14 14:08:03 +0000 |
commit | 51cfbdc4d16739caac4d946fadbe678444aafe34 (patch) | |
tree | 56dfd8f1cd9fd933de27268b32402e955a43ac2b /chef-config/spec/unit/path_helper_spec.rb | |
parent | 05064423057d4cf46f4713b81b08829cf6d20af6 (diff) | |
download | chef-51cfbdc4d16739caac4d946fadbe678444aafe34.tar.gz |
Use double quotes by default
This is an entirely mechanically generated (chefstyle -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 'chef-config/spec/unit/path_helper_spec.rb')
-rw-r--r-- | chef-config/spec/unit/path_helper_spec.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/chef-config/spec/unit/path_helper_spec.rb b/chef-config/spec/unit/path_helper_spec.rb index 3e2a0fd129..8b2fe62ce6 100644 --- a/chef-config/spec/unit/path_helper_spec.rb +++ b/chef-config/spec/unit/path_helper_spec.rb @@ -16,8 +16,8 @@ # limitations under the License. # -require 'chef-config/path_helper' -require 'spec_helper' +require "chef-config/path_helper" +require "spec_helper" RSpec.describe ChefConfig::PathHelper do @@ -27,30 +27,30 @@ RSpec.describe ChefConfig::PathHelper do describe "join" do it "joins starting with '' resolve to absolute paths" do - expect(path_helper.join('', 'a', 'b')).to eq("#{path_helper.path_separator}a#{path_helper.path_separator}b") + expect(path_helper.join("", "a", "b")).to eq("#{path_helper.path_separator}a#{path_helper.path_separator}b") end it "joins ending with '' add a / to the end" do - expect(path_helper.join('a', 'b', '')).to eq("a#{path_helper.path_separator}b#{path_helper.path_separator}") + expect(path_helper.join("a", "b", "")).to eq("a#{path_helper.path_separator}b#{path_helper.path_separator}") end end describe "dirname" do it "dirname('abc') is '.'" do - expect(path_helper.dirname('abc')).to eq('.') + expect(path_helper.dirname("abc")).to eq(".") end it "dirname('/') is '/'" do expect(path_helper.dirname(path_helper.path_separator)).to eq(path_helper.path_separator) end it "dirname('a/b/c') is 'a/b'" do - expect(path_helper.dirname(path_helper.join('a', 'b', 'c'))).to eq(path_helper.join('a', 'b')) + expect(path_helper.dirname(path_helper.join("a", "b", "c"))).to eq(path_helper.join("a", "b")) end it "dirname('a/b/c/') is 'a/b'" do - expect(path_helper.dirname(path_helper.join('a', 'b', 'c', ''))).to eq(path_helper.join('a', 'b')) + expect(path_helper.dirname(path_helper.join("a", "b", "c", ""))).to eq(path_helper.join("a", "b")) end it "dirname('/a/b/c') is '/a/b'" do - expect(path_helper.dirname(path_helper.join('', 'a', 'b', 'c'))).to eq(path_helper.join('', 'a', 'b')) + expect(path_helper.dirname(path_helper.join("", "a", "b", "c"))).to eq(path_helper.join("", "a", "b")) end end end @@ -113,11 +113,11 @@ RSpec.describe ChefConfig::PathHelper do include_examples("common_functionality") it "path_separator is /" do - expect(path_helper.path_separator).to eq('/') + expect(path_helper.path_separator).to eq("/") end it "cleanpath removes extra slashes alone" do - expect(path_helper.cleanpath('/a///b/c/d/')).to eq('/a/b/c/d') + expect(path_helper.cleanpath("/a///b/c/d/")).to eq("/a/b/c/d") end describe "platform-specific #join behavior" do @@ -269,7 +269,7 @@ RSpec.describe ChefConfig::PathHelper do describe "all_homes" do before do - stub_const('ENV', env) + stub_const("ENV", env) allow(ChefConfig).to receive(:windows?).and_return(is_windows) end |