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

Failing UT spec to demonstrate missing params with mounts (#1085) #1447

Closed
wants to merge 1 commit into from

Conversation

jlfaber
Copy link
Contributor

@jlfaber jlfaber commented Jul 19, 2016

This spec demonstrates a variant of #1085 that appears not to have been fixed by #1422 (@namusyaka).

@dblock
Copy link
Member

dblock commented Jul 20, 2016

This looks legit @jlfaber.


subject.format :json
subject.namespace :outer do
params { requires :outer_val, type: Integer }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, this should be executed before namespace :outer, I guess it should be something like:

      subject.format :json
      subject.params { requires :outer_val, type: Integer }
      subject.namespace :outer do
        get { declared(params) }
        namespace :inner do
          mount mounted
        end

And then your specs are passed locally. What do you think? /cc @dblock

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. You are correct. I had mistakenly thought that once a params block was declared, it would remain in effect until superceded by another params block. That turns out not to be the case; the block is consumed by the get in my example leaving nothing for the mounted endpoint to inherit.

Closing.

@jlfaber jlfaber closed this Sep 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants