Module: Flow

Defined in:
lib/flow/flow/core.rb,
lib/flow/errors.rb,
lib/flow/version.rb,
lib/flow/flow/flux.rb,
lib/flow/flow_base.rb,
lib/flow/state_base.rb,
lib/flow/flow/status.rb,
lib/flow/state_proxy.rb,
lib/flow/flow/trigger.rb,
lib/flow/flow/callbacks.rb,
lib/flow/operation/core.rb,
lib/flow/operation_base.rb,
lib/flow/flow/operations.rb,
lib/flow/malfunction/base.rb,
lib/flow/operation/status.rb,
lib/flow/flow/transactions.rb,
lib/flow/operation/execute.rb,
lib/flow/operation/failures.rb,
lib/flow/operation/accessors.rb,
lib/flow/operation/callbacks.rb,
lib/flow/operation/transactions.rb,
lib/flow/operation/error_handler.rb,
lib/generators/flow/flow_generator.rb,
lib/flow/concerns/transaction_wrapper.rb,
lib/generators/flow/state/state_generator.rb,
lib/flow/rspec/custom_matchers/have_on_state.rb,
lib/generators/flow/install/install_generator.rb,
lib/generators/flow/operation/operation_generator.rb,
lib/generators/flow/application_flow/application_flow_generator.rb,
lib/generators/flow/application_state/application_state_generator.rb,
lib/generators/flow/application_operation/application_operation_generator.rb

Overview

RSpec matcher for making assertions on the state of a Flow or Operation after it has been run.

class ExampleOperation

def behavior
  state.foo = "some data"
  state.bar = "some other data"
end

end

class ExampleFlow

operations [ ExampleOperation ]

end

RSpec.describe ExampleOperation, type: :operation do

subject { operation.execute }

it { is_expected.to have_on_state foo: "some data" }
it { is_expected.to have_on_state foo: instance_of(String) }
it { is_expected.to have_on_state foo: "some data", bar: "some other data" }

end

RSpec.describe ExampleFlow, type: :operation do

subject { flow.trigger }

it { is_expected.to have_on_state foo: "some data" }
it { is_expected.to have_on_state foo: instance_of(String) }
it { is_expected.to have_on_state foo: "some data", bar: "some other data" }

end

Defined Under Namespace

Modules: CustomMatchers, Flow, Generators, Malfunction, Operation, TransactionWrapper Classes: AlreadyExecutedError, Error, FlowBase, FlowError, NotValidatedError, OperationBase, OperationError, StateBase, StateError, StateInvalidError, StateProxy

Constant Summary collapse

VERSION =
"0.11.1"