diff options
Diffstat (limited to 'spec/ruby/library/date/eql_spec.rb')
-rw-r--r-- | spec/ruby/library/date/eql_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/ruby/library/date/eql_spec.rb b/spec/ruby/library/date/eql_spec.rb new file mode 100644 index 0000000000..efecde8944 --- /dev/null +++ b/spec/ruby/library/date/eql_spec.rb @@ -0,0 +1,12 @@ +require File.expand_path('../../../spec_helper', __FILE__) +require 'date' + +describe "Date#eql?" do + it "returns true if self is equal to another date" do + Date.civil(2007, 10, 11).eql?(Date.civil(2007, 10, 11)).should be_true + end + + it "returns false if self is not equal to another date" do + Date.civil(2007, 10, 11).eql?(Date.civil(2007, 10, 12)).should be_false + end +end |