From 51cfbdc4d16739caac4d946fadbe678444aafe34 Mon Sep 17 00:00:00 2001 From: Thom May Date: Thu, 14 Jan 2016 14:08:03 +0000 Subject: 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. --- spec/unit/knife/osc_user_reregister_spec.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'spec/unit/knife/osc_user_reregister_spec.rb') diff --git a/spec/unit/knife/osc_user_reregister_spec.rb b/spec/unit/knife/osc_user_reregister_spec.rb index 989eb180f1..95fa2c2dc8 100644 --- a/spec/unit/knife/osc_user_reregister_spec.rb +++ b/spec/unit/knife/osc_user_reregister_spec.rb @@ -16,7 +16,7 @@ # limitations under the License. # -require 'spec_helper' +require "spec_helper" # DEPRECATION NOTE # This code only remains to support users still operating with @@ -27,31 +27,31 @@ describe Chef::Knife::OscUserReregister do before(:each) do Chef::Knife::OscUserReregister.load_deps @knife = Chef::Knife::OscUserReregister.new - @knife.name_args = [ 'a_user' ] - @user_mock = double('user_mock', :private_key => "private_key") + @knife.name_args = [ "a_user" ] + @user_mock = double("user_mock", :private_key => "private_key") allow(Chef::User).to receive(:load).and_return(@user_mock) @stdout = StringIO.new allow(@knife.ui).to receive(:stdout).and_return(@stdout) end - it 'prints usage and exits when a user name is not provided' do + it "prints usage and exits when a user name is not provided" do @knife.name_args = [] expect(@knife).to receive(:show_usage) expect(@knife.ui).to receive(:fatal) expect { @knife.run }.to raise_error(SystemExit) end - it 'reregisters the user and prints the key' do + it "reregisters the user and prints the key" do expect(@user_mock).to receive(:reregister).and_return(@user_mock) @knife.run expect(@stdout.string).to match( /private_key/ ) end - it 'writes the private key to a file when --file is specified' do + it "writes the private key to a file when --file is specified" do expect(@user_mock).to receive(:reregister).and_return(@user_mock) - @knife.config[:file] = '/tmp/a_file' + @knife.config[:file] = "/tmp/a_file" filehandle = StringIO.new - expect(File).to receive(:open).with('/tmp/a_file', 'w').and_yield(filehandle) + expect(File).to receive(:open).with("/tmp/a_file", "w").and_yield(filehandle) @knife.run expect(filehandle.string).to eq("private_key") end -- cgit v1.2.1