Module: Flow
- Defined in:
- lib/flow/flow/core.rb,
lib/flow.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/flow/trigger.rb,
lib/flow/state/output.rb,
lib/flow/state/status.rb,
lib/flow/flow/callbacks.rb,
lib/flow/operation/core.rb,
lib/flow/operation_base.rb,
lib/flow/flow/operations.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/flow/flow/errors/state_invalid.rb,
lib/generators/flow/flow_generator.rb,
lib/flow/state/errors/not_validated.rb,
lib/flow/concerns/transaction_wrapper.rb,
lib/flow/operation/errors/already_rewound.rb,
lib/generators/flow/state/state_generator.rb,
lib/flow/operation/errors/already_executed.rb,
lib/generators/flow/install/install_generator.rb,
lib/generators/flow/operation/operation_generator.rb,
lib/flow/spec_helper/custom_matchers/have_on_state.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. = "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: Callbacks, Core, CustomMatchers, Errors, Flux, Generators, Operation, Operations, State, Status, TransactionWrapper, Transactions, Trigger Classes: FlowBase, OperationBase, StateBase
Constant Summary collapse
- VERSION =
"0.10.4"