class RSpec::Support::ObjectFormatter::DateTimeInspector
Constants
- FORMAT
Public Class Methods
can_inspect?(object)
click to toggle source
# File lib/rspec/support/object_formatter.rb, line 152 def self.can_inspect?(object) defined?(DateTime) && DateTime === object end
Public Instance Methods
inspect()
click to toggle source
ActiveSupport sometimes overrides inspect. If `ActiveSupport` is defined use a custom format string that includes more time precision.
# File lib/rspec/support/object_formatter.rb, line 158 def inspect if defined?(ActiveSupport) object.strftime(FORMAT) else object.inspect end end