-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
organize \
DoFoo,
DoBar = self.if(
:success,
then: DoBaz = chain('DoBaz', A, B, C),
else: Qux
)Here we have to use chain when assigning to a testable constant DoBaz
but if A expects something, then the interactor wiring specs will fail. Meaning you have to fully extract a class.
class DoBaz
include Interactify
expect :a
organize A, B, C
endorganize \
DoFoo,
DoBar = self.if(
:success,
then: DoBaz,
else: Qux
)OR we can do
organize \
DoFoo,
DoBar = self.if(
:success,
then: DoBaz = chain('DoBaz', A, B, C).expect(:a),
else: Qux
)but here the expect can come visually far away from the start of the chain.
May be nice to have to do
organize \
DoFoo,
DoBar = self.if(
:success,
then: DoBaz = chain('DoBaz', A, B, C, expect: :a),
else: Qux
)organize \
DoFoo,
DoBar = self.if(
:success,
then: DoBaz = chain('DoBaz', expect: :a, A, B, C),
else: Qux
)Also to investigate why wiring specs are not passing in previous contract info into if and chain calls