summaryrefslogtreecommitdiff
path: root/spec/unit/application
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/application
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/application')
-rw-r--r--spec/unit/application/apply_spec.rb2
-rw-r--r--spec/unit/application/client_spec.rb10
-rw-r--r--spec/unit/application/knife_spec.rb20
-rw-r--r--spec/unit/application/solo_spec.rb6
4 files changed, 19 insertions, 19 deletions
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb
index f6cd0bae03..5aad53d209 100644
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'spec_helper'
+require "spec_helper"
describe Chef::Application::Apply do
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb
index 727536f1f8..6ff9597b53 100644
--- a/spec/unit/application/client_spec.rb
+++ b/spec/unit/application/client_spec.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'spec_helper'
+require "spec_helper"
describe Chef::Application::Client, "reconfigure" do
let(:app) do
@@ -42,8 +42,8 @@ describe Chef::Application::Client, "reconfigure" do
ARGV.replace(@original_argv)
end
- describe 'parse cli_arguments' do
- it 'should call set_specific_recipes' do
+ describe "parse cli_arguments" do
+ it "should call set_specific_recipes" do
expect(app).to receive(:set_specific_recipes).and_return(true)
app.reconfigure
end
@@ -310,9 +310,9 @@ describe Chef::Application::Client, "run_application", :unix_only do
@client = Chef::Client.new
allow(Chef::Client).to receive(:new).and_return(@client)
allow(@client).to receive(:run) do
- @pipe[1].puts 'started'
+ @pipe[1].puts "started"
sleep 1
- @pipe[1].puts 'finished'
+ @pipe[1].puts "finished"
end
end
diff --git a/spec/unit/application/knife_spec.rb b/spec/unit/application/knife_spec.rb
index 0fb25176f9..163489110f 100644
--- a/spec/unit/application/knife_spec.rb
+++ b/spec/unit/application/knife_spec.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'spec_helper'
+require "spec_helper"
require "#{CHEF_SPEC_DATA}/knife_subcommand/test_yourself"
describe Chef::Application::Knife do
@@ -84,7 +84,7 @@ describe Chef::Application::Knife do
describe "when given a path to the client key" do
it "expands a relative path relative to the CWD" do
- relative_path = '.chef/client.pem'
+ relative_path = ".chef/client.pem"
allow(Dir).to receive(:pwd).and_return(CHEF_SPEC_DATA)
with_argv(*%W{noop knife command -k #{relative_path}}) do
expect(@knife).to receive(:exit).with(0)
@@ -94,19 +94,19 @@ describe Chef::Application::Knife do
end
it "expands a ~/home/path to the correct full path" do
- home_path = '~/.chef/client.pem'
+ home_path = "~/.chef/client.pem"
with_argv(*%W{noop knife command -k #{home_path}}) do
expect(@knife).to receive(:exit).with(0)
@knife.run
end
- expect(Chef::Config[:client_key]).to eq(File.join(ENV['HOME'], '.chef/client.pem').gsub((File::ALT_SEPARATOR || '\\'), File::SEPARATOR))
+ expect(Chef::Config[:client_key]).to eq(File.join(ENV["HOME"], ".chef/client.pem").gsub((File::ALT_SEPARATOR || '\\'), File::SEPARATOR))
end
it "does not expand a full path" do
full_path = if windows?
- 'C:/chef/client.pem'
+ "C:/chef/client.pem"
else
- '/etc/chef/client.pem'
+ "/etc/chef/client.pem"
end
with_argv(*%W{noop knife command -k #{full_path}}) do
expect(@knife).to receive(:exit).with(0)
@@ -135,7 +135,7 @@ describe Chef::Application::Knife do
expect(@knife).to receive(:exit).with(0)
@knife.run
end
- expect(Chef::Config[:environment]).to eq('production')
+ expect(Chef::Config[:environment]).to eq("production")
end
it "should load the environment from the CLI options" do
@@ -143,7 +143,7 @@ describe Chef::Application::Knife do
expect(@knife).to receive(:exit).with(0)
@knife.run
end
- expect(Chef::Config[:environment]).to eq('development')
+ expect(Chef::Config[:environment]).to eq("development")
end
it "should override the config file environment with the CLI environment" do
@@ -152,7 +152,7 @@ describe Chef::Application::Knife do
expect(@knife).to receive(:exit).with(0)
@knife.run
end
- expect(Chef::Config[:environment]).to eq('override')
+ expect(Chef::Config[:environment]).to eq("override")
end
it "should override the config file environment with the CLI environment regardless of order" do
@@ -161,7 +161,7 @@ describe Chef::Application::Knife do
expect(@knife).to receive(:exit).with(0)
@knife.run
end
- expect(Chef::Config[:environment]).to eq('override')
+ expect(Chef::Config[:environment]).to eq("override")
end
it "should run a sub command with the applications command line option prototype" do
diff --git a/spec/unit/application/solo_spec.rb b/spec/unit/application/solo_spec.rb
index 7013bfa0bc..c5b24f7826 100644
--- a/spec/unit/application/solo_spec.rb
+++ b/spec/unit/application/solo_spec.rb
@@ -15,7 +15,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-require 'spec_helper'
+require "spec_helper"
describe Chef::Application::Solo do
@@ -34,7 +34,7 @@ describe Chef::Application::Solo do
end
describe "configuring the application" do
- it 'should call set_specific_recipes' do
+ it "should call set_specific_recipes" do
expect(app).to receive(:set_specific_recipes)
app.reconfigure
end
@@ -106,7 +106,7 @@ Enable chef-client interval runs by setting `:client_fork = true` in your config
describe "when the recipe_url configuration option is specified" do
let(:tarfile) { StringIO.new("remote_tarball_content") }
let(:target_file) { StringIO.new }
- let(:shellout) { double(run_command: nil, error!: nil, stdout: '') }
+ let(:shellout) { double(run_command: nil, error!: nil, stdout: "") }
before do
Chef::Config[:cookbook_path] = "#{Dir.tmpdir}/chef-solo/cookbooks"