Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
k1LoW committed Dec 6, 2020
1 parent 3ec6906 commit 231865e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions spec/holidays_detailed_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/holidays_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 231865e

Please sign in to comment.