Class: Sequent::Test::WorkflowHelpers::FakeTransactionProvider
- Inherits:
-
Object
- Object
- Sequent::Test::WorkflowHelpers::FakeTransactionProvider
- Defined in:
- lib/sequent/test/event_handler_helpers.rb
Instance Method Summary collapse
- #after_commit(&block) ⇒ Object
-
#initialize ⇒ FakeTransactionProvider
constructor
A new instance of FakeTransactionProvider.
- #transactional ⇒ Object
Constructor Details
#initialize ⇒ FakeTransactionProvider
Returns a new instance of FakeTransactionProvider.
32 33 34 |
# File 'lib/sequent/test/event_handler_helpers.rb', line 32 def initialize @after_commit_blocks = [] end |
Instance Method Details
#after_commit(&block) ⇒ Object
41 42 43 |
# File 'lib/sequent/test/event_handler_helpers.rb', line 41 def after_commit(&block) @after_commit_blocks << block end |
#transactional ⇒ Object
36 37 38 39 |
# File 'lib/sequent/test/event_handler_helpers.rb', line 36 def transactional yield @after_commit_blocks.each(&:call) end |