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

Avoid polluting Grape::Middleware::Error #1421

Merged
merged 1 commit into from
Jun 10, 2016

Conversation

namusyaka
Copy link
Contributor

@@ -1456,6 +1456,34 @@ def custom_error!(name)
expect(last_response.body).to eq 'hello bob'
end

it 'avoids polluting global namespace' do
class A < Grape::API
Copy link
Member

Choose a reason for hiding this comment

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

These should be let(:A) { Class.new(...) } to avoid polluting (see what I did there :) the global namespace.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OMG you're right ;) Thanks!

@namusyaka namusyaka force-pushed the avoid-polluting branch 2 times, most recently from 361ec06 to 24b68e8 Compare June 10, 2016 01:59
@dblock dblock merged commit 7805dd0 into ruby-grape:master Jun 10, 2016
@dblock
Copy link
Member

dblock commented Jun 10, 2016

Merged.

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