twingly / twingly-search-api-ruby

:gem: Twingly Blog Search API in Ruby
https://developer.twingly.com/
MIT License
4 stars 0 forks source link

Actually test what we intend to test #52

Closed dentarg closed 8 years ago

dentarg commented 8 years ago

As discussed at https://github.com/twingly/twingly-search-api-php/pull/19#issuecomment-188708787

dentarg commented 8 years ago

Oh, we are running into https://byparker.com/blog/2014/ruby-2-2-0-time-parse-localtime-regression/, the tests fails for Ruby < 2.2.

[4] pry(main)> RUBY_VERSION
=> "2.1.5"
[5] pry(main)> require "time"
=> true
[7] pry(main)> time_str = "2016-02-09 09:01:22 +0500"
=> "2016-02-09 09:01:22 +0500"
[14] pry(main)> Time.parse(time_str)
=> 2016-02-09 05:01:22 +0100
[1] pry(main)> RUBY_VERSION
=> "2.2.4"
[2] pry(main)> require "time"
=> true
[3] pry(main)> time_str = "2016-02-09 09:01:22 +0500"
=> "2016-02-09 09:01:22 +0500"
[4] pry(main)> Time.parse(time_str)
=> 2016-02-09 09:01:22 +0500
roback commented 8 years ago

LGTM! :shipit: