lib/oboe/frameworks/sinatra.rb in oboe-2.6.7.1 vs lib/oboe/frameworks/sinatra.rb in oboe-2.6.8
- old
+ new
@@ -79,12 +79,12 @@
Oboe::Loading.load_access_key
Oboe::Inst.load_instrumentation
::Sinatra::Base.use Oboe::Rack
- # When in TEST environment, we load this instrumentation regardless.
+ # When in the gem TEST environment, we load this instrumentation regardless.
# Otherwise, only when Padrino isn't around.
- unless defined?(::Padrino) and not (ENV['RACK_ENV'] == "test")
+ unless defined?(::Padrino) and not (ENV.has_key?("OBOE_GEM_TEST"))
# Padrino has 'enhanced' routes and rendering so the Sinatra
# instrumentation won't work anyways. Only load for pure Sinatra apps.
::Oboe::Util.send_include(::Sinatra::Base, ::Oboe::Sinatra::Base)
::Oboe::Util.send_include(::Sinatra::Templates, ::Oboe::Sinatra::Templates)