Skip to content

Commit

Permalink
Fix Rubocop offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
davidcpell committed Nov 16, 2016
1 parent 1af650e commit a6033f8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/kitchen/driver/ec2/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@

# nothing else is set, so we default to this
it "loads IAM credentials last" do
env_creds(nil, nil) do
env_creds(nil, nil) do
expect(::Aws::SharedCredentials).to receive(:new).and_return(false)
expect(Aws::InstanceProfileCredentials).to receive(:new).and_return(iam)
expect(Kitchen::Driver::Aws::Client.get_credentials("profile", nil, nil, nil)).to eq(iam)
end
end

it "loads shared credentials second to last" do
env_creds(nil, nil) do
env_creds(nil, nil) do
expect(Aws::SharedCredentials).to \
receive(:new).with(:profile_name => "profile").and_return(shared)
expect(Kitchen::Driver::Aws::Client.get_credentials("profile", nil, nil, nil)).to eq(shared)
Expand Down Expand Up @@ -117,11 +117,11 @@
expect(client.resource).to be_a(Aws::EC2::Resource)
end

def env_creds(key_id, secret, &block)
def env_creds(key_id, secret, &block)
ClimateControl.modify(
"AWS_ACCESS_KEY_ID" => key_id,
"AWS_SECRET_ACCESS_KEY" => secret,
) do
"AWS_SECRET_ACCESS_KEY" => secret
) do
block.call
end
end
Expand Down

0 comments on commit a6033f8

Please sign in to comment.