serverspec/serverspec — pull request #396 by KitaitiMakoto (2014-05-03 20:21:48+00:00)
Title: Narrow helper influence

Hi,

I found that we cannot use [Faraday][faraday] gem in Serverspec examples because it raise an error like this:

```ruby
# faraday_spec.rb
require 'serverspec'
require 'faraday'

describe Faraday do
it do
conn = Faraday.new url: 'http://example.net'
response = conn.get '/'
response.body.should include 'Example Domain'
end
end
```

$ bundle exec rspec faraday_spec.rb
F

Failures:

1) Faraday
Failure/Error: conn = Faraday.new url: 'http://example.net'
NoMethodError: undefined method `path' for "http://example.net":String

undefined method `path' for "http://example.net":String
# ./faraday_spec.rb:6:in `block (2 levels) in '

Finished in 0.03188 seconds
1 example, 1 failure

Failed examples:

rspec ./faraday_spec.rb:5 # Faraday

It is why this occurs that Faraday sees whether `url` argument responds to `host` message or not to judge to parse it by `URI()` or so: https://github.com/lostisland/faraday/blob/v0.9.0.rc7/lib/faraday/utils.rb#L243

I think it is essentially problem that including `Serverspec::Helper::Type` at top level context has too wide influence although it may be reasonable to send a pull request to Faraday project to ask not to use `respond_to?(:host)`.
So, I send the pull request to this project.

Could you consider about that?

Thank you.

[faraday]: https://github.com/lostisland/faraday