diff options
author | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 12:15:26 -0700 |
---|---|---|
committer | Lamont Granquist <lamont@scriptkiddie.org> | 2016-08-17 13:25:02 -0700 |
commit | a0c32511bc6634538374ca4b433032b8acd05f96 (patch) | |
tree | 15c7cfbd0d773488ab814e7c24f0c58505c9134b /spec/unit/knife/key_list_spec.rb | |
parent | 3d0379a2ad531a0b3db5ed2827bf30ef07b26100 (diff) | |
download | chef-a0c32511bc6634538374ca4b433032b8acd05f96.tar.gz |
fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgrade
Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'spec/unit/knife/key_list_spec.rb')
-rw-r--r-- | spec/unit/knife/key_list_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/unit/knife/key_list_spec.rb b/spec/unit/knife/key_list_spec.rb index 2d4f0a07bb..82fd1e4a09 100644 --- a/spec/unit/knife/key_list_spec.rb +++ b/spec/unit/knife/key_list_spec.rb @@ -78,9 +78,9 @@ describe Chef::Knife::KeyList do let(:ui) { instance_double("Chef::Knife::UI") } shared_examples_for "key list run command" do - let(:key_list_object) { + let(:key_list_object) do described_class.new(actor, list_method, ui, config) - } + end before do allow(Chef::Key).to receive(list_method).and_return(http_response) @@ -191,26 +191,26 @@ describe Chef::Knife::KeyList do context "when list_method is :list_by_user" do it_should_behave_like "key list run command" do let(:list_method) { :list_by_user } - let(:http_response) { + let(:http_response) do [ { "uri" => "https://api.opscode.piab/users/charmander/keys/non-expired1", "name" => "non-expired1", "expired" => false }, { "uri" => "https://api.opscode.piab/users/charmander/keys/non-expired2", "name" => "non-expired2", "expired" => false }, { "uri" => "https://api.opscode.piab/users/mary/keys/out-of-date", "name" => "out-of-date", "expired" => true }, ] - } + end end end context "when list_method is :list_by_client" do it_should_behave_like "key list run command" do let(:list_method) { :list_by_client } - let(:http_response) { + let(:http_response) do [ { "uri" => "https://api.opscode.piab/organizations/pokemon/clients/charmander/keys/non-expired1", "name" => "non-expired1", "expired" => false }, { "uri" => "https://api.opscode.piab/organizations/pokemon/clients/charmander/keys/non-expired2", "name" => "non-expired2", "expired" => false }, { "uri" => "https://api.opscode.piab/organizations/pokemon/clients/mary/keys/out-of-date", "name" => "out-of-date", "expired" => true }, ] - } + end end end end |