Sha256: ec4696eab11521067567b6015207e60d6d2d8110b6828a6a46eda41521a34879

Contents?: true

Size: 539 Bytes

Versions: 1

Compression:

Stored size: 539 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_truthy
    Parsi::Date.leap?(1391).should be_truthy
    Parsi::Date.leap?(1395).should be_truthy
  end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parsi-date-0.2.6 spec/parsi-date/leap_spec.rb