Skip to content

Commit

Permalink
More RuboCop cleanup not directly related to the PR
Browse files Browse the repository at this point in the history
  • Loading branch information
dldinternet committed Dec 25, 2016
1 parent 1f7d03d commit a76ea82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/kitchen/driver/gce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def authorization
end

def winrm_transport?
instance.transport.name.downcase == "winrm"
instance.transport.name.casecmp("winrm").zero?
end

def update_windows_password(server_name)
Expand Down Expand Up @@ -416,7 +416,7 @@ def image_alias_url

latest_image = connection.list_images(image_project).items
.select { |image| image.name.start_with?(image_prefix) }
.sort { |a, b| a.name <=> b.name }
.sort_by(&:name)
.last

return if latest_image.nil?
Expand Down
4 changes: 2 additions & 2 deletions spec/kitchen/driver/gce_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@
end

it "raises an exception if the block raises something other than a ClientError" do
expect { driver.check_api_call { raise RuntimeError.new("whoops") } }.to raise_error(RuntimeError)
expect { driver.check_api_call { raise "whoops" } }.to raise_error(RuntimeError)
end

it "returns true if the block does not raise an exception" do
Expand Down Expand Up @@ -832,7 +832,7 @@

it "accepts custom metadata" do
foo = double("foo")
config[:metadata] = { 'foo' => 'bar' }
config[:metadata] = { "foo" => "bar" }

expect(instance).to receive(:name).and_return("instance_name")
expect(driver).to receive(:env_user).and_return("env_user")
Expand Down

0 comments on commit a76ea82

Please sign in to comment.