summaryrefslogtreecommitdiff
path: root/spec/support/shared/context/client.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/shared/context/client.rb')
-rw-r--r--spec/support/shared/context/client.rb20
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/support/shared/context/client.rb b/spec/support/shared/context/client.rb
index 4b90fcaedd..6797a4ad22 100644
--- a/spec/support/shared/context/client.rb
+++ b/spec/support/shared/context/client.rb
@@ -11,16 +11,16 @@ shared_context "client" do
let(:ohai_data) do
{
- :fqdn => fqdn,
- :hostname => hostname,
- :machinename => machinename,
- :platform => platform,
- :platform_version => platform_version,
+ fqdn: fqdn,
+ hostname: hostname,
+ machinename: machinename,
+ platform: platform,
+ platform_version: platform_version,
}
end
let(:ohai_system) do
- ohai = instance_double("Ohai::System", :all_plugins => true, :data => ohai_data, logger: logger)
+ ohai = instance_double("Ohai::System", all_plugins: true, data: ohai_data, logger: logger)
allow(ohai).to receive(:[]) do |k|
ohai_data[k]
end
@@ -80,7 +80,7 @@ shared_context "a client run" do
let(:reporting_rest_client) { double("Chef::ServerAPI (reporting client)") }
let(:runner) { instance_double("Chef::Runner") }
- let(:audit_runner) { instance_double("Chef::Audit::Runner", :failed? => false) }
+ let(:audit_runner) { instance_double("Chef::Audit::Runner", failed?: false) }
def stub_for_register
# --Client.register
@@ -136,7 +136,7 @@ shared_context "a client run" do
expect_any_instance_of(Chef::CookbookSynchronizer).to receive(:sync_cookbooks)
expect(Chef::ServerAPI).to receive(:new).with(Chef::Config[:chef_server_url], version_class: Chef::CookbookManifestVersions).and_return(http_cookbook_sync)
expect(http_cookbook_sync).to receive(:post).
- with("environments/_default/cookbook_versions", { :run_list => [] }).
+ with("environments/_default/cookbook_versions", { run_list: [] }).
and_return({})
end
@@ -250,8 +250,8 @@ end
shared_context "audit phase completed with failed controls" do
let(:audit_runner) do
- instance_double("Chef::Audit::Runner", :failed? => true,
- :num_failed => 1, :num_total => 3) end
+ instance_double("Chef::Audit::Runner", failed?: true,
+ num_failed: 1, num_total: 3) end
let(:audit_error) do
err = Chef::Exceptions::AuditsFailed.new(audit_runner.num_failed, audit_runner.num_total)