Skip to content

Commit 231865e

Browse files
committed
Fix test
1 parent 3ec6906 commit 231865e

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

spec/holidays_detailed_spec.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
expect(@v1.key?(date)).to eq true
1818
if detail['name'] == '振替休日'
1919
expect(@v1[date]['name']).to match(/ 振替休日\z/)
20+
elsif detail['name'] == '国民の休日'
21+
expect(@v1[date]['name']).to eq('休日')
2022
else
2123
expect(@v1[date]).to eq(detail)
2224
end
@@ -25,6 +27,8 @@
2527
expect(@holidays_detailed.key?(date)).to eq true
2628
if / 振替休日\z/ =~ detail['name']
2729
expect(@holidays_detailed[date]['name']).to eq('振替休日')
30+
elsif detail['name'] == '休日'
31+
expect(@holidays_detailed[date]['name']).to eq('国民の休日')
2832
else
2933
expect(@holidays_detailed[date]).to eq(detail)
3034
end

spec/holidays_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
it 'holidays.yml should have date of holiday.v1.x.yml' do
1616
@holidays.each do |date, detail|
1717
expect(@v1.key?(date)).to eq true
18-
expect(@v1[date]).to eq(detail).or match(/ 振替休日\z/)
18+
expect(@v1[date]).to eq(detail).or match(/ 振替休日\z/).or eq('休日')
1919
end
2020
@v1.each do |date, detail|
2121
expect(@holidays.key?(date)).to eq true
22-
expect(@holidays[date]).to eq(detail).or eq('振替休日')
22+
expect(@holidays[date]).to eq(detail).or eq('振替休日').or eq('国民の休日')
2323
end
2424
expect(@holidays.length).to eq @v1.length
2525
end

0 commit comments

Comments
 (0)