Method: Sentry::TestHelper#reset_sentry_globals!
- Defined in:
- lib/sentry/test_helper.rb
#reset_sentry_globals! ⇒ Object (private)
124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/sentry/test_helper.rb', line 124 def reset_sentry_globals! Sentry::MUTEX.synchronize do # Don't check initialized? because sometimes we stub it in tests if Sentry.instance_variable_defined?(:@main_hub) Sentry::GLOBALS.each do |var| Sentry.instance_variable_set(:"@#{var}", nil) end Thread.current.thread_variable_set(Sentry::THREAD_LOCAL, nil) end end end |