lib/bcdd/result/context/expectations.rb in bcdd-result-0.8.0 vs lib/bcdd/result/context/expectations.rb in bcdd-result-0.9.0
- old
+ new
@@ -13,13 +13,13 @@
end
private_class_method :mixin!, :mixin_module, :result_factory_without_expectations
def Success(type, **value)
- Success.new(type: type, value: value, subject: subject, expectations: contract)
+ _ResultAs(Success, type, value)
end
def Failure(type, **value)
- Failure.new(type: type, value: value, subject: subject, expectations: contract)
+ _ResultAs(Failure, type, value)
end
end
end