Skip to content

Commit

Permalink
Calendar: failing solemnity-loss integration test
Browse files Browse the repository at this point in the history
refs #80

Solemnities are the only rank of celebrations guaranteed to be
celebrated every year, but due to a bug in the transfer logic on some
years one solemnity gets lost and another one scheduled twice (both on
the original date and on the date to which it was ought to be
transferred)
  • Loading branch information
igneus committed Mar 6, 2021
1 parent 9febb4f commit d7627b1
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions spec/calendar_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,30 @@
expect(celebs[0]).to eq st_none
end

describe 'no sanctorale solemnity is lost' do
let(:sanctorale) { CR::Data::GENERAL_ROMAN_ENGLISH.load }

(2020..2040).each do |year|
it year do
calendar = CR::Calendar.new year, sanctorale

all_actually_celebrated = Set.new(
calendar
.each
.collect {|day| day.celebrations.collect &:symbol }
.flatten
.compact
)
sanctorale_solemnities =
sanctorale.solemnities.collect {|_,celebration| celebration.symbol }

sanctorale_solemnities.each do |sym|
expect(all_actually_celebrated).to include sym
end
end
end
end

it 'transfer of suppressed Annunciation (real world example)' do
c = described_class.new 2015, s

Expand Down

0 comments on commit d7627b1

Please sign in to comment.