Sha256: f022e53546190a89e2181bf04c6b76e53f6475a400600da8767a7c1acfe1dd78

Contents?: true

Size: 529 Bytes

Versions: 8

Compression:

Stored size: 529 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

describe "Parsi::Date#leap?" do
  it "returns true if a year is a leap year in the Parsi (Jalali) calendar" do
    Parsi::Date.leap?(1387).should be_true
    Parsi::Date.leap?(1391).should be_true
    Parsi::Date.leap?(1395).should be_true
  end

  it "returns false if a year is not a leap year in the Parsi (Jalali) calendar" do
    Parsi::Date.leap?(1390).should be_false
    Parsi::Date.leap?(1392).should be_false
    Parsi::Date.leap?(1400).should be_false
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
parsi-date-0.2.5 spec/parsi-date/leap_spec.rb
parsi-date-0.2.4 spec/parsi-date/leap_spec.rb
parsi-date-0.2.3 spec/parsi-date/leap_spec.rb
parsi-date-0.2.2 spec/parsi-date/leap_spec.rb
parsi-date-0.2.1 spec/parsi-date/leap_spec.rb
parsi-date-0.2 spec/parsi-date/leap_spec.rb
parsi-date-0.1 spec/parsi-date/leap_spec.rb
parsi-date-0.1.pre spec/parsi-date/leap_spec.rb