Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds failing spec for ruby-grape/grape#1239 #1267

Closed
wants to merge 1 commit into from

Conversation

arempe93
Copy link
Contributor

@arempe93 arempe93 commented Feb 3, 2016

Reference to #1239
Not sure how to fix this...but I added a few more specs to declared that demonstrate the issue.

The problem lies in this code in lib/grape/dsl/inside_route.rb#50

children.is_a?(Array) ? [] : {}

children is always an Array so it always gives []. Replacing that code with a plain [] gives the same results. Replacing it with {} passes the nested Hash spec, but then fails the nested Array spec.

@dnesteryuk
Copy link
Member

@arempe93 thanks for your contribution, similar tests were added in #2043, it should be sufficient 😉

@dnesteryuk dnesteryuk closed this May 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants