Class: Sequent::Test::WorkflowHelpers::FakeTransactionProvider
- Inherits:
-
Object
- Object
- Sequent::Test::WorkflowHelpers::FakeTransactionProvider
- Defined in:
- lib/sequent/test/workflow_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.
35 36 37 |
# File 'lib/sequent/test/workflow_helpers.rb', line 35 def initialize @after_commit_blocks = [] end |
Instance Method Details
#after_commit(&block) ⇒ Object
44 45 46 |
# File 'lib/sequent/test/workflow_helpers.rb', line 44 def after_commit(&block) @after_commit_blocks << block end |
#transactional ⇒ Object
39 40 41 42 |
# File 'lib/sequent/test/workflow_helpers.rb', line 39 def transactional yield @after_commit_blocks.each(&:call) end |