diff --git a/spec/holidays_detailed_spec.rb b/spec/holidays_detailed_spec.rb index 4109974..5742d47 100644 --- a/spec/holidays_detailed_spec.rb +++ b/spec/holidays_detailed_spec.rb @@ -17,6 +17,8 @@ expect(@v1.key?(date)).to eq true if detail['name'] == '振替休日' expect(@v1[date]['name']).to match(/ 振替休日\z/) + elsif detail['name'] == '国民の休日' + expect(@v1[date]['name']).to eq('休日') else expect(@v1[date]).to eq(detail) end @@ -25,6 +27,8 @@ expect(@holidays_detailed.key?(date)).to eq true if / 振替休日\z/ =~ detail['name'] expect(@holidays_detailed[date]['name']).to eq('振替休日') + elsif detail['name'] == '休日' + expect(@holidays_detailed[date]['name']).to eq('国民の休日') else expect(@holidays_detailed[date]).to eq(detail) end diff --git a/spec/holidays_spec.rb b/spec/holidays_spec.rb index 8a2c24e..fec7d4d 100644 --- a/spec/holidays_spec.rb +++ b/spec/holidays_spec.rb @@ -15,11 +15,11 @@ it 'holidays.yml should have date of holiday.v1.x.yml' do @holidays.each do |date, detail| expect(@v1.key?(date)).to eq true - expect(@v1[date]).to eq(detail).or match(/ 振替休日\z/) + expect(@v1[date]).to eq(detail).or match(/ 振替休日\z/).or eq('休日') end @v1.each do |date, detail| expect(@holidays.key?(date)).to eq true - expect(@holidays[date]).to eq(detail).or eq('振替休日') + expect(@holidays[date]).to eq(detail).or eq('振替休日').or eq('国民の休日') end expect(@holidays.length).to eq @v1.length end