ruby / spec

The Ruby Spec Suite aka ruby/spec
MIT License
600 stars 388 forks source link

Improve specs for Time#gmtime/Time#utc #1206

Closed herwinw closed 1 week ago

herwinw commented 1 month ago

The Time comparison does cancel out the timezone differences, so even if you did not call the method, the spec would still pass.

herwinw commented 1 month ago

Todo: validate/extend checks for Time#== (or Time#<=>)

herwinw commented 4 weeks ago

The second commit adds some extra checks for Time#<=>. I picked CET and BRT pretty much at random for the time zones other than UTC, I wanted something before UTC and something after UTC, and these just happened to be the ones I knew from memory.