calendar
The current calendar that features should use when handling dates.
var calendar: Calendar { get set }
By default, the calendar returned from Calendar.autoupdatingCurrent
is supplied. When used in a testing context, access will call to reportIssue
when invoked, unless explicitly overridden using withDependencies(_:operation:)
:
// Provision model with overridden dependencies
let model = withDependencies {
$0.calendar = Calendar(identifier: .gregorian)
} operation: {
FeatureModel()
}
// Make assertions with model...