Module: Bullematic::Integrations::Minitest::TestHelper
- Defined in:
- lib/bullematic/integrations/minitest.rb,
sig/generated/bullematic/integrations/minitest.rbs
Instance Method Summary collapse
-
#setup ⇒ void
: () -> void.
-
#teardown ⇒ void
: () -> void.
Instance Method Details
#setup ⇒ void
This method returns an undefined value.
: () -> void
20 21 22 23 24 25 26 27 28 29 |
# File 'lib/bullematic/integrations/minitest.rb', line 20 def setup super @bullematic_request_started = false return unless Bullematic.enabled? if defined?(Bullet) && Bullet.enable? Bullet.start_request @bullematic_request_started = true end end |
#teardown ⇒ void
This method returns an undefined value.
: () -> void
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/bullematic/integrations/minitest.rb', line 32 def teardown begin if @bullematic_request_started begin if Bullematic.enabled? && Bullet.enable? Bullematic::Notifier.process_notifications(context_id: object_id) end ensure Bullet.end_request @bullematic_request_started = false end end ensure super end end |