spec/fixtures/use_cases.rb in action_logic-0.3.2 vs spec/fixtures/use_cases.rb in action_logic-0.3.3
- old
+ new
@@ -190,12 +190,12 @@
end
class ValidateBeforeMixedTypeAndPresenceUseCase
include ActionLogic::ActionUseCase
- validates_before odd_integer_test: { presence: ->(i) { i % 2 != 0 } },
- string_test: { type: String, presence: true }
+ validates_before odd_integer_test: { type: Integer, presence: ->(i) { i % 2 != 0 }, type: Integer },
+ string_test: { presence: false, type: String }
def call
end
def tasks
@@ -388,48 +388,8 @@
def tasks
[UseCaseTestTask1,
UseCaseTestTask2,
UseCaseHaltTestTask,
UseCaseTestTask3]
- end
-end
-
-class UseCaseTestTask1
- include ActionLogic::ActionTask
-
- def call
- context.first = "first"
- end
-end
-
-class UseCaseTestTask2
- include ActionLogic::ActionTask
-
- def call
- context.second = "second"
- end
-end
-
-class UseCaseTestTask3
- include ActionLogic::ActionTask
-
- def call
- context.third = "third"
- end
-end
-
-class UseCaseFailureTestTask
- include ActionLogic::ActionTask
-
- def call
- context.fail!(Constants::FAILURE_MESSAGE)
- end
-end
-
-class UseCaseHaltTestTask
- include ActionLogic::ActionTask
-
- def call
- context.halt!(Constants::HALT_MESSAGE)
end
end
# :nocov: