You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Failure/Error: expect{ uri.url }.to_not raise_error
expected no Exception, got #<URI::InvalidURIError: the scheme http does not accept registry part: with_underscore.example.com (or bad hostname?)> with backtrace:
# ./lib/twitter/base.rb:77:in `block in define_uri_method'
# ./spec/twitter/tweet_spec.rb:325:in `block (4 levels) in <top (required)>'
# ./spec/twitter/tweet_spec.rb:325:in `block (3 levels) in <top (required)>'
The text was updated successfully, but these errors were encountered:
Technically, hostnames that contain underscores are not valid, so Ruby’s built-in URI library refuses to parse them. The addressable gem does a better job of handling some of these invalid-but-exist-in-the-real-world edge cases.
Here's an example tweet_spec that fails with URI
It fails with;
The text was updated successfully, but these errors were encountered: