Sha256: b011362b72909db75df192ce382d4c88eb9ed3f91d0550e54a1381962c92993d

Contents?: true

Size: 527 Bytes

Versions: 15

Compression:

Stored size: 527 Bytes

Contents

require "test_helper"


class LeapYearTest < ActiveSupport::TestCase
  include Hiccup
  
  
  
  test "should correctly determine whether a year is a leap year or not" do
    enum = Enumerable::ScheduleEnumerator.new(Schedule.new, Date.today)
    
    assert enum.send(:leap_year?, 1988), "1988 is a leap year"
    assert enum.send(:leap_year?, 2000), "2000 is a leap year"
    refute enum.send(:leap_year?, 1998), "1998 is not a leap year"
    refute enum.send(:leap_year?, 1900), "1900 is not a leap year"
  end
  
  
  
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hiccup-0.5.14 test/leap_year_test.rb
hiccup-0.5.13 test/leap_year_test.rb
hiccup-0.5.12 test/leap_year_test.rb
hiccup-0.5.11 test/leap_year_test.rb
hiccup-0.5.10 test/leap_year_test.rb
hiccup-0.5.9 test/leap_year_test.rb
hiccup-0.5.8 test/leap_year_test.rb
hiccup-0.5.7 test/leap_year_test.rb
hiccup-0.5.6 test/leap_year_test.rb
hiccup-0.5.5 test/leap_year_test.rb
hiccup-0.5.4 test/leap_year_test.rb
hiccup-0.5.3 test/leap_year_test.rb
hiccup-0.5.2 test/leap_year_test.rb
hiccup-0.5.1 test/leap_year_test.rb
hiccup-0.5.0 test/leap_year_test.rb