spec/fixtures/use_cases.rb in action_logic-0.2.8 vs spec/fixtures/use_cases.rb in action_logic-0.3.0
- old
+ new
@@ -187,9 +187,24 @@
[UseCaseTestTask1,
UseCaseTestTask2]
end
end
+class ValidateBeforeMixedTypeAndPresenceUseCase
+ include ActionLogic::ActionUseCase
+
+ validates_before odd_integer_test: { presence: ->(i) { i % 2 != 0 } },
+ string_test: { type: String, presence: true }
+
+ def call
+ end
+
+ def tasks
+ [UseCaseTestTask1,
+ UseCaseTestTask2]
+ end
+end
+
class ValidateAfterTestUseCase
include ActionLogic::ActionUseCase
validates_after Constants::ALL_VALIDATIONS