Sha256: 052f51d4c28190e932b75d05afd7fdd0ceb53f131452fd6e8c78565f38093d70
Contents?: true
Size: 858 Bytes
Versions: 11
Compression:
Stored size: 858 Bytes
Contents
require 'insulin' describe Insulin::OnTrack::Date do otd = Insulin::OnTrack::Date.new "Jun 22 2012 9:00:12 AM" it "should have the correct timestamp" do otd["timestamp"].to_s.should == "2012-06-22 09:00:12 +0100" end it "should have the correct time" do otd["time"].should == "09:00:12 BST" end it "should have the correct date" do otd["date"].should == "2012-06-22" end it "should have the correct day" do otd["day"].should == "friday" end it "should have the correct short time" do otd["short_time"].should == "09:00" end otd_gmt = Insulin::OnTrack::Date.new "Jan 22 2012 9:00:12 PM" it "should have the correct timestamp" do otd_gmt["timestamp"].to_s.should == "2012-01-22 21:00:12 +0000" end it "should have the correct time and TZ" do otd_gmt["time"].should == "21:00:12 GMT" end end
Version data entries
11 entries across 11 versions & 1 rubygems