Sha256: f278c9539805d5f44255b6ff967dca365dc2c498d51cc7a247b4b5852918eee0
Contents?: true
Size: 660 Bytes
Versions: 2
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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kronos-0.1.7 | spec/to_s_spec.rb |
kronos-0.1.6 | spec/to_s_spec.rb |