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
end
organize \
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
Here we have to use
chainwhen assigning to a testable constantDoBazbut if A expects something, then the interactor wiring specs will fail. Meaning you have to fully extract a class.
OR we can do
but here the
expectcan come visually far away from the start of thechain.May be nice to have to do
Also to investigate why wiring specs are not passing in previous contract info into
ifandchaincalls