Skip to content

Commit

Permalink
extend sunset into fall 2023
Browse files Browse the repository at this point in the history
  • Loading branch information
jivey committed Aug 8, 2023
1 parent ad8bb52 commit f96305b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/term_year.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
const_set 'VISIBLE_TERMS', [:spring, :summer, :fall, :winter]

SUNSET_YEAR = 2023
SUNSET_YEAR_VISIBLE_TERMS = [:spring, :summer]
SUNSET_YEAR_VISIBLE_TERMS = [:spring, :summer, :fall]

attr_reader :starts_at, :ends_at

Expand Down
13 changes: 9 additions & 4 deletions spec/lib/term_year_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -208,19 +208,24 @@
it 'returns the correct visible_term_years' do
expect(TermYear.visible_term_years(spring_date_time)).to eq [
TermYear.new(:spring, current_year),
TermYear.new(:summer, current_year)
TermYear.new(:summer, current_year),
TermYear.new(:fall, current_year)
]

expect(TermYear.visible_term_years(spring_summer_date_time)).to eq [
TermYear.new(:spring, current_year),
TermYear.new(:summer, current_year)
TermYear.new(:summer, current_year),
TermYear.new(:fall, current_year)
]

expect(TermYear.visible_term_years(summer_fall_date_time)).to eq [
TermYear.new(:summer, current_year)
TermYear.new(:summer, current_year),
TermYear.new(:fall, current_year)
]

expect(TermYear.visible_term_years(fall_date_time)).to eq []
expect(TermYear.visible_term_years(fall_date_time)).to eq [
TermYear.new(:fall, current_year)
]
end
end

Expand Down

0 comments on commit f96305b

Please sign in to comment.