Skip to content

Commit

Permalink
Fix rubocop violations
Browse files Browse the repository at this point in the history
  • Loading branch information
ixti committed Dec 12, 2015
1 parent 640460f commit c8850f8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
7 changes: 2 additions & 5 deletions spec/lib/http_spec.rb
Expand Up @@ -339,11 +339,8 @@
end

it "unifies socket errors into HTTP::ConnectionError" do
expect { HTTP.get "http://thishostshouldnotexists.com" }
.to raise_error HTTP::ConnectionError

expect { HTTP.get "http://127.0.0.1:000" }
.to raise_error HTTP::ConnectionError
expect { HTTP.get "http://thishostshouldnotexists.com" }.to raise_error HTTP::ConnectionError
expect { HTTP.get "http://127.0.0.1:000" }.to raise_error HTTP::ConnectionError
end
end
end
3 changes: 1 addition & 2 deletions spec/support/connection_reuse_shared.rb
Expand Up @@ -56,8 +56,7 @@
# rubocop:enable Style/RescueModifier

# Should error because we tried to use a bad socket
expect { client.get("#{server.endpoint}/socket").body.to_s }
.to raise_error HTTP::ConnectionError
expect { client.get("#{server.endpoint}/socket").body.to_s }.to raise_error HTTP::ConnectionError

# Should succeed since we create a new socket
second_socket = client.get("#{server.endpoint}/socket").body.to_s
Expand Down
3 changes: 1 addition & 2 deletions spec/support/http_handling_shared.rb
Expand Up @@ -173,8 +173,7 @@
# rubocop:enable Style/RescueModifier

# Should error because we tried to use a bad socket
expect { client.get("#{server.endpoint}/socket").body.to_s }
.to raise_error HTTP::ConnectionError
expect { client.get("#{server.endpoint}/socket").body.to_s }.to raise_error HTTP::ConnectionError

# Should succeed since we create a new socket
second_socket_id = client.get("#{server.endpoint}/socket").body.to_s
Expand Down

0 comments on commit c8850f8

Please sign in to comment.