rspec/rspec-expectations — pull request #416 by thomas-holmes (2014-01-08 05:58:42+00:00)
Title: Use more display precision for Time and DateTime

The `eq` matcher often results in confusing output when comparing `Time`
and `DateTime` objects.

`Time#inspect` returns a value that is not full precision. This often
leads to a confusing failure message when two time objects differ by
fractional seconds. The matcher returns a failure but the diff shows
identical values. Microseconds have been added to the diff output for
`Time`.

By default `DateTime#inspect` outputs enough precision to prevent this
problem. `ActiveSupport` monkey patches `#inspect` to print a more human
readable but ambiguous representation. `ActiveSupport` aliases the
original method to `#default_inspect`. If this method exists it is used
instead for outputting the diff content.

Fixes rspec/rspec-expectations#331