-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Requiring 'sinatra' and 'sinatra/contrib' causes method redefined warnings on Test #1319
Comments
This is probably due to our Delegator doing weird things: |
I'm extremely new to sinatra so I might be wrong, but I think problem is within the ConfigFile extension. |
I am running into this problem with Sinatra 2.0.5: source "https://rubygems.org"
gem 'sinatra'
gem 'sinatra-contrib'
group :test do
gem 'rack-test'
gem 'ci_reporter_test_unit'
end And getting all these errors with:
|
@darkn3rd can confirm, currently running sinatra 2.0.5. |
I solved this by only
|
It seems like this issue is when requiring any/all of these: |
I created a repo with very basic setup that replicates the issue: https://github.com/faragorn/sinatra-method-redefined
If you comment out
require 'sinatra/contrib'
inapp.rb
the warnings will go away.Environment:
Ruby Version: 2.2.2
Sinatra Version: 2.0.0
Testing Framework: Minitest (haven't tested this with any other frameworks, but pretty sure the outcome is gonna be the same)
Run
rake test
Result
The text was updated successfully, but these errors were encountered: