Sha256: a8db00cccc3d3e51f1088e7b8c3041443a23a6bfaf1be2899ba9e35473896670
Contents?: true
Size: 660 Bytes
Versions: 1
Compression:
Stored size: 660 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "to_s" do def new_kronos(year=nil, month=nil, day=nil) k = Kronos.new k.year = year if year k.month = month if month k.day = day if day k end describe "2005" do it "should be '2005'" do k = new_kronos(2005) k.to_s.should == '2005' end end describe "Feb. 2005" do it "should be '2005-02'" do k = new_kronos(2005, 2) k.to_s.should == '2005-02' end end describe "Feb. 9, 2005" do it "should be '2005-02-09'" do k = new_kronos(2005, 2, 9) k.to_s.should == '2005-02-09' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kronos-0.1.8 | spec/to_s_spec.rb |