summaryrefslogtreecommitdiff
path: root/spec/ruby/library/date/eql_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/date/eql_spec.rb')
-rw-r--r--spec/ruby/library/date/eql_spec.rb12
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..79fabc47f4
--- /dev/null
+++ b/spec/ruby/library/date/eql_spec.rb
@@ -0,0 +1,12 @@
+require_relative '../../spec_helper'
+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 == 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 == false
+ end
+end