You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The above spec is skipped because it is not fully implemented and its functionality is essentially tested in the no overlap validator spec. BUT in AAS proper and in the systems that use it, it is common to require an overlapping span and non-overlapping span to compare with. It is done slightly differently just about everywhere.
AAS could add a helper method for specs (can't think of a non-spec use case right now) that would look like:
overlapping_span_for(span,type=:right,amount=1)
span is an array of two dates, type is :left, :right, :inner, or :outer, and amount is any number of days (0 for "inclusive" overlap) up to the number of days the input span spans. For example,
|--------| <- span
|------| <- left overlap
|----| <- inner overlap
|---------| <- right overlap
|----------------| <- outer overlap
It may also be useful to add an option for a negative amount, i.e. not overlapping. Or perhaps another method entirely, to avoid confusion. I suppose it would be equivalent to...
defnon_overlapping_span_for(span,type=:right,amount=1)failArgumentError(whatever)unless[:right,:left].include?typefailArgumentError(whatever)unlessamount.positive?# I think "positive" comes from ActiveSupportoverlapping_span_for(span,type,amount: -amount)end
The text was updated successfully, but these errors were encountered:
e.g.
acts_as_span/spec/lib/span_instance/overlap_spec.rb
Line 35 in 64dbb8e
The above spec is skipped because it is not fully implemented and its functionality is essentially tested in the no overlap validator spec. BUT in AAS proper and in the systems that use it, it is common to require an overlapping span and non-overlapping span to compare with. It is done slightly differently just about everywhere.
AAS could add a helper method for specs (can't think of a non-spec use case right now) that would look like:
span
is an array of two dates, type is:left
,:right
,:inner
, or:outer
, andamount
is any number of days (0 for "inclusive" overlap) up to the number of days the input span spans. For example,It may also be useful to add an option for a negative amount, i.e. not overlapping. Or perhaps another method entirely, to avoid confusion. I suppose it would be equivalent to...
The text was updated successfully, but these errors were encountered: