Sha256: a7c840f23d8b0262343e5e3bcf7dddbcf1b7ec1b85709e9c843842f4d858cc23
Contents?: true
Size: 579 Bytes
Versions: 52
Compression:
Stored size: 579 Bytes
Contents
require File.expand_path('../../../spec_helper', __FILE__) require File.expand_path('../fixtures/methods', __FILE__) describe "Time#eql?" do it "returns true iff time is equal in seconds and usecs to other time" do Time.at(100, 100).should eql(Time.at(100, 100)) Time.at(100, 100).should_not eql(Time.at(100, 99)) Time.at(100, 100).should_not eql(Time.at(99, 100)) end it "returns false when given a non-time value" do Time.at(100, 100).should_not eql("100") Time.at(100, 100).should_not eql(100) Time.at(100, 100).should_not eql(100.1) end end
Version data entries
52 entries across 52 versions & 2 rubygems