Permalink
Browse files

Adding method to compare two dates using json format.

  • Loading branch information...
1 parent 5662ca4 commit 8f01af0427868a221725d9748b8db85f40a23e3f @fltiago committed Oct 11, 2012
Showing with 10 additions and 0 deletions.
  1. +1 −0 lib/webmock.rb
  2. +9 −0 lib/webmock/util/date_comparator.rb
View
@@ -15,6 +15,7 @@
require 'webmock/util/hash_keys_stringifier'
require 'webmock/util/json'
require 'webmock/util/version_checker'
+require 'webmock/util/date_comparator'
require 'webmock/matchers/hash_including_matcher'
@@ -0,0 +1,9 @@
+module WebMock
+ module Util
+ class Util::DateComparator
+ def self.compare(date1, date2)
+ date1.to_json === date2.to_json
+ end
+ end
+ end
+end

0 comments on commit 8f01af0

Please sign in to comment.