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
Given that Hyperclient::Resource#to_hash has no arguments passed, we don't actually get to do anything with the to_h method on the Hyperclient::Resource, and there's nothing returned, hence "nil" is the result.
Dumb question, why is the !Array.method_defined?(method) used there? If I change it to a simple "else" all tests still pass.
Honestly I don't remember the reason for that Array.defined, git blame should surface it. There was definitely a test for this that was failing at some point.
Feature: API navigation
Scenario: Links
! When I connect to the API # features/support/api.rb:19
~ Then I should be able to navigate to posts and authors
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Scenario: Templated links
! Given I connect to the API # features/support/api.rb:19
~ When I search for a post with a templated link
~ Then the API should receive the request with all the params
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Scenario: Attributes
! Given I connect to the API # features/support/api.rb:19
~ When I load a single post
~ Then I should be able to access it's title and body
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Scenario: Embedded resources
! Given I connect to the API # features/support/api.rb:19
~ When I load a single post
~ Then I should also be able to access it's embedded comments
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Scenario: Navigation links
! When I connect to the API # features/support/api.rb:19
~ Then I should be able to navigate to next page
~ Then I should be able to navigate to next page without links
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Scenario: Counts
! When I connect to the API # features/support/api.rb:19
~ Then I should be able to count embedded items
~ Then I should be able to iterate over embedded items
getaddrinfo: nodename nor servname provided, or not known
/Users/joelcourtney/.rvm/rubies/ruby-2.2.5/lib/ruby/2.2.0/net/http.rb:879:in `initialize'
Activity
dblock commentedon Aug 16, 2016
Interesting, probably just a bug, feel free to write a spec/PR a fix.
jufemaiz commentedon Aug 18, 2016
Ok, a bit of poking and I've discovered it.
Array#to_h exists
Array#to_hash doesn't exist
hyperclient/lib/hyperclient/resource.rb
Line 87 in 39a07cb
Given that Hyperclient::Resource#to_hash has no arguments passed, we don't actually get to do anything with the to_h method on the Hyperclient::Resource, and there's nothing returned, hence "nil" is the result.
Dumb question, why is the !Array.method_defined?(method) used there? If I change it to a simple "else" all tests still pass.
dblock commentedon Aug 18, 2016
Honestly I don't remember the reason for that
Array.defined,git blameshould surface it. There was definitely a test for this that was failing at some point.jufemaiz commentedon Aug 18, 2016
03ecf0a
But before that it was an Enumerable check.
13a62b3
dblock commentedon Aug 19, 2016
Are you running
rakewith all the tests? I think you're missing the feature scenarios. That commit has a test witheachthat otherwise fails.jufemaiz commentedon Aug 19, 2016
rake spinache output:
This continues all the way through.
jufemaiz commentedon Aug 26, 2026
@dblock 🎉