summaryrefslogtreecommitdiff
path: root/spec/unit/shell/shell_session_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/shell/shell_session_spec.rb')
-rw-r--r--spec/unit/shell/shell_session_spec.rb52
1 files changed, 26 insertions, 26 deletions
diff --git a/spec/unit/shell/shell_session_spec.rb b/spec/unit/shell/shell_session_spec.rb
index c96453eeae..c4cb7c6815 100644
--- a/spec/unit/shell/shell_session_spec.rb
+++ b/spec/unit/shell/shell_session_spec.rb
@@ -53,16 +53,16 @@ describe Shell::ClientSession do
let(:session) { Shell::ClientSession.instance }
let(:client) do
double("Chef::Client.new",
- :run_ohai => true,
- :load_node => true,
- :build_node => true,
- :register => true,
- :sync_cookbooks => {}
+ run_ohai: true,
+ load_node: true,
+ build_node: true,
+ register: true,
+ sync_cookbooks: {}
)
end
before do
- Chef::Config[:shell_config] = { :override_runlist => [Chef::RunList::RunListItem.new("shell::override")] }
+ Chef::Config[:shell_config] = { override_runlist: [Chef::RunList::RunListItem.new("shell::override")] }
session.node = node
session.json_configuration = json_attribs
end
@@ -90,16 +90,16 @@ describe Shell::SoloSession do
let(:session) { Shell::SoloSession.instance }
let(:client) do
double("Chef::Client.new",
- :run_ohai => true,
- :load_node => true,
- :build_node => true,
- :register => true,
- :sync_cookbooks => {}
+ run_ohai: true,
+ load_node: true,
+ build_node: true,
+ register: true,
+ sync_cookbooks: {}
)
end
before do
- Chef::Config[:shell_config] = { :override_runlist => [Chef::RunList::RunListItem.new("shell::override")] }
+ Chef::Config[:shell_config] = { override_runlist: [Chef::RunList::RunListItem.new("shell::override")] }
session.node = node
session.json_configuration = json_attribs
end
@@ -128,18 +128,18 @@ describe Shell::StandAloneSession do
let(:session) { Shell::StandAloneSession.instance }
let(:client) do
double("Chef::Client.new",
- :run_ohai => true,
- :load_node => true,
- :build_node => true,
- :register => true,
- :sync_cookbooks => {}
+ run_ohai: true,
+ load_node: true,
+ build_node: true,
+ register: true,
+ sync_cookbooks: {}
)
end
let(:recipe) { Chef::Recipe.new(nil, nil, run_context) }
let(:run_context) { Chef::RunContext.new(node, {}, events) }
before do
- Chef::Config[:shell_config] = { :override_runlist => [Chef::RunList::RunListItem.new("shell::override")] }
+ Chef::Config[:shell_config] = { override_runlist: [Chef::RunList::RunListItem.new("shell::override")] }
session.node = node
session.json_configuration = json_attribs
session.run_context = run_context
@@ -166,7 +166,7 @@ describe Shell::StandAloneSession do
it "runs chef with the standalone recipe" do
allow(session).to receive(:node_built?).and_return(true)
allow(Chef::Log).to receive(:level)
- chef_runner = double("Chef::Runner.new", :converge => :converged)
+ chef_runner = double("Chef::Runner.new", converge: :converged)
# pre-heat resource collection cache
session.resource_collection
@@ -185,7 +185,7 @@ describe Shell::SoloLegacySession do
let(:json_attribs) { { "a" => "b" } }
before do
- Chef::Config[:shell_config] = { :override_runlist => [Chef::RunList::RunListItem.new("shell::override")] }
+ Chef::Config[:shell_config] = { override_runlist: [Chef::RunList::RunListItem.new("shell::override")] }
Chef::Config[:shell_solo] = true
@session = Shell::SoloLegacySession.instance
@node = Chef::Node.new
@@ -229,7 +229,7 @@ describe Shell::SoloLegacySession do
it "runs chef with a resource collection from the compiled cookbooks" do
allow(@session).to receive(:node_built?).and_return(true)
- chef_runner = double("Chef::Runner.new", :converge => :converged)
+ chef_runner = double("Chef::Runner.new", converge: :converged)
expect(Chef::Runner).to receive(:new).with(an_instance_of(Chef::RunContext)).and_return(chef_runner)
expect(@recipe.run_chef).to eq(:converged)
@@ -237,11 +237,11 @@ describe Shell::SoloLegacySession do
it "passes the shell CLI args to the client" do
@client = double("Chef::Client.new",
- :run_ohai => true,
- :load_node => true,
- :build_node => true,
- :register => true,
- :sync_cookbooks => {})
+ run_ohai: true,
+ load_node: true,
+ build_node: true,
+ register: true,
+ sync_cookbooks: {})
expect(Chef::Client).to receive(:new).with(json_attribs, Chef::Config[:shell_config]).and_return(@client)
@session.json_configuration = json_attribs
@session.send(:rebuild_node)