Module: Temporal::Testing

Defined in:
lib/temporal/testing.rb,
lib/temporal/testing/future_registry.rb,
lib/temporal/testing/temporal_override.rb,
lib/temporal/testing/workflow_override.rb,
lib/temporal/testing/workflow_execution.rb,
lib/temporal/testing/scheduled_workflows.rb,
lib/temporal/testing/local_activity_context.rb,
lib/temporal/testing/local_workflow_context.rb

Defined Under Namespace

Modules: ScheduledWorkflows, TemporalOverride, WorkflowOverride Classes: FutureRegistry, LocalActivityContext, LocalWorkflowContext, WorkflowExecution, WorkflowIDNotScheduled

Constant Summary collapse

DISABLED_MODE =
nil
LOCAL_MODE =
:local

Class Method Summary collapse

Class Method Details

.disabled!(&block) ⇒ Object


15
16
17
# File 'lib/temporal/testing.rb', line 15

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

.disabled?Boolean

Returns:

  • (Boolean)

19
20
21
# File 'lib/temporal/testing.rb', line 19

def disabled?
  mode == DISABLED_MODE
end

.local!(&block) ⇒ Object


11
12
13
# File 'lib/temporal/testing.rb', line 11

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

.local?Boolean

Returns:

  • (Boolean)

23
24
25
# File 'lib/temporal/testing.rb', line 23

def local?
  mode == LOCAL_MODE
end