Module: MtkFramework::ActiveInteractionMocks::InteractionGroupMocksHelper

Includes:
InteractionMocksHelper
Defined in:
lib/mtk_framework/active_interaction_mocks/interaction_group_mocks_helper.rb

Instance Method Summary collapse

Methods included from InteractionMocksHelper

#mock_interaction

Instance Method Details

#group_mock_interaction(klass, methods: nil, failing: false, mandatory: false, expected_params: nil, return_proc: nil, call_original: false, &exec_block) ⇒ Object

/!\ mandatory is set to false by default because it mocks inside a before block



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/mtk_framework/active_interaction_mocks/interaction_group_mocks_helper.rb', line 11

def group_mock_interaction(klass,
                           methods: nil,
                           failing: false,
                           mandatory: false,
                           expected_params: nil,
                           return_proc: nil, # a proc that will be executed in the before block scope
                           call_original: false,
                           &exec_block)
  before do
    mock_interaction(klass,
                     methods: methods,
                     failing: failing,
                     mandatory: mandatory,
                     expected_params: expected_params,
                     return_proc: return_proc,
                     call_original: call_original,
                     &exec_block)
  end
end