Sha256: 7a55cdc7330b1efeca7c2b970a9770c5f9ce6680c39dc7fc29a36c070baf78bd

Contents?: true

Size: 424 Bytes

Versions: 1

Compression:

Stored size: 424 Bytes

Contents

# -*- coding: utf-8 -*-
require "sixarm_ruby_to_id_test"
require "sixarm_ruby_to_id/date"

describe Date do

  describe "#to_date_id" do
    it "casts to a date id YYYY-MM-DD" do
      Date.parse("2000-12-31").to_date_id.must_equal "2000-12-31"
    end
  end

  describe "#to_date_ids" do
    it "casts to a date id YYYY-MM-DD list" do
      Date.parse("2000-12-31").to_date_ids.must_equal ["2000-12-31"]
    end
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
sixarm_ruby_to_id-1.1.0 test/sixarm_ruby_to_id_test/date_test.rb