Module: Cadence::Testing

Defined in:
lib/cadence/testing.rb,
lib/cadence/testing/future_registry.rb,
lib/cadence/testing/cadence_override.rb,
lib/cadence/testing/workflow_override.rb,
lib/cadence/testing/workflow_execution.rb,
lib/cadence/testing/local_activity_context.rb,
lib/cadence/testing/local_workflow_context.rb

Defined Under Namespace

Modules: CadenceOverride, WorkflowOverride Classes: FutureRegistry, LocalActivityContext, LocalWorkflowContext, WorkflowExecution

Constant Summary collapse

DISABLED_MODE =
nil
LOCAL_MODE =
:local

Class Method Summary collapse

Class Method Details

.disabled!(&block) ⇒ Object


14
15
16
# File 'lib/cadence/testing.rb', line 14

def disabled!(&block)
  set_mode(DISABLED_MODE, &block)
end

.disabled?Boolean

Returns:

  • (Boolean)

18
19
20
# File 'lib/cadence/testing.rb', line 18

def disabled?
  mode == DISABLED_MODE
end

.local!(&block) ⇒ Object


10
11
12
# File 'lib/cadence/testing.rb', line 10

def local!(&block)
  set_mode(LOCAL_MODE, &block)
end

.local?Boolean

Returns:

  • (Boolean)

22
23
24
# File 'lib/cadence/testing.rb', line 22

def local?
  mode == LOCAL_MODE
end