Module: Pgbus::Testing::MinitestHelpers

Includes:
Assertions
Defined in:
lib/pgbus/testing/minitest.rb

Overview

Minitest integration for Pgbus test helpers.

Include in your test_helper.rb:

require "pgbus/testing/minitest"

class ActiveSupport::TestCase
  include Pgbus::Testing::MinitestHelpers
end

This provides:

- Automatic fake mode + store clearing per test
- assert_pgbus_published / assert_no_pgbus_published
- perform_published_events
- pgbus_published_events

Instance Method Summary collapse

Methods included from Assertions

#assert_no_pgbus_published, #assert_pgbus_published, #perform_published_events, #pgbus_published_events

Instance Method Details

#before_setupObject



25
26
27
28
29
# File 'lib/pgbus/testing/minitest.rb', line 25

def before_setup
  Pgbus::Testing.fake!
  Pgbus::Testing.store.clear!
  super
end