summaryrefslogtreecommitdiff
path: root/spec/unit/provider/template
diff options
context:
space:
mode:
authorThom May <thom@chef.io>2016-01-14 14:08:03 +0000
committerThom May <thom@chef.io>2016-01-14 14:08:03 +0000
commit51cfbdc4d16739caac4d946fadbe678444aafe34 (patch)
tree56dfd8f1cd9fd933de27268b32402e955a43ac2b /spec/unit/provider/template
parent05064423057d4cf46f4713b81b08829cf6d20af6 (diff)
downloadchef-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 'spec/unit/provider/template')
-rw-r--r--spec/unit/provider/template/content_spec.rb36
1 files changed, 18 insertions, 18 deletions
diff --git a/spec/unit/provider/template/content_spec.rb b/spec/unit/provider/template/content_spec.rb
index 509c8cf33b..7a19f59de1 100644
--- a/spec/unit/provider/template/content_spec.rb
+++ b/spec/unit/provider/template/content_spec.rb
@@ -16,7 +16,7 @@
# limitations under the License.
#
-require 'spec_helper'
+require "spec_helper"
describe Chef::Provider::Template::Content do
@@ -30,13 +30,13 @@ describe Chef::Provider::Template::Content do
let(:new_resource) do
double("Chef::Resource::Template (new)",
- :cookbook_name => 'openldap',
- :recipe_name => 'default',
+ :cookbook_name => "openldap",
+ :recipe_name => "default",
:source_line => "/Users/lamont/solo/cookbooks/openldap/recipes/default.rb:2:in `from_file'",
:source_line_file => "/Users/lamont/solo/cookbooks/openldap/recipes/default.rb",
:source_line_number => "2",
- :source => 'openldap_stuff.conf.erb',
- :name => 'openldap_stuff.conf',
+ :source => "openldap_stuff.conf.erb",
+ :name => "openldap_stuff.conf",
:path => resource_path,
:local => false,
:cookbook => nil,
@@ -47,8 +47,8 @@ describe Chef::Provider::Template::Content do
end
let(:rendered_file_locations) {
- [Dir.tmpdir + '/openldap_stuff.conf',
- enclosing_directory + '/openldap_stuff.conf']
+ [Dir.tmpdir + "/openldap_stuff.conf",
+ enclosing_directory + "/openldap_stuff.conf"]
}
let(:run_context) do
@@ -73,20 +73,20 @@ describe Chef::Provider::Template::Content do
end
it "finds the template file in the cookbook cache if it isn't local" do
- expect(content.template_location).to eq(CHEF_SPEC_DATA + '/cookbooks/openldap/templates/default/openldap_stuff.conf.erb')
+ expect(content.template_location).to eq(CHEF_SPEC_DATA + "/cookbooks/openldap/templates/default/openldap_stuff.conf.erb")
end
it "finds the template file locally if it is local" do
allow(new_resource).to receive(:local).and_return(true)
- allow(new_resource).to receive(:source).and_return('/tmp/its_on_disk.erb')
- expect(content.template_location).to eq('/tmp/its_on_disk.erb')
+ allow(new_resource).to receive(:source).and_return("/tmp/its_on_disk.erb")
+ expect(content.template_location).to eq("/tmp/its_on_disk.erb")
end
it "should use the cookbook name if defined in the template resource" do
- allow(new_resource).to receive(:cookbook_name).and_return('apache2')
- allow(new_resource).to receive(:cookbook).and_return('openldap')
+ allow(new_resource).to receive(:cookbook_name).and_return("apache2")
+ allow(new_resource).to receive(:cookbook).and_return("openldap")
allow(new_resource).to receive(:source).and_return("test.erb")
- expect(content.template_location).to eq(CHEF_SPEC_DATA + '/cookbooks/openldap/templates/default/test.erb')
+ expect(content.template_location).to eq(CHEF_SPEC_DATA + "/cookbooks/openldap/templates/default/test.erb")
end
it "returns a tempfile in the tempdir when :file_staging_uses_destdir is not set" do
@@ -130,14 +130,14 @@ describe Chef::Provider::Template::Content do
describe "when using location helpers" do
let(:new_resource) do
double("Chef::Resource::Template (new)",
- :cookbook_name => 'openldap',
- :recipe_name => 'default',
+ :cookbook_name => "openldap",
+ :recipe_name => "default",
:source_line => CHEF_SPEC_DATA + "/cookbooks/openldap/recipes/default.rb:2:in `from_file'",
:source_line_file => CHEF_SPEC_DATA + "/cookbooks/openldap/recipes/default.rb",
:source_line_number => "2",
- :source => 'helpers.erb',
- :name => 'helpers.erb',
- :path => CHEF_SPEC_DATA + '/cookbooks/openldap/templates/default/helpers.erb',
+ :source => "helpers.erb",
+ :name => "helpers.erb",
+ :path => CHEF_SPEC_DATA + "/cookbooks/openldap/templates/default/helpers.erb",
:local => false,
:cookbook => nil,
:variables => {},