Skip to content

Instantly share code, notes, and snippets.

@joemsak
Created October 4, 2014 19:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joemsak/8e80105dd8d7234af948 to your computer and use it in GitHub Desktop.
Save joemsak/8e80105dd8d7234af948 to your computer and use it in GitHub Desktop.
require 'chronic'
describe Chronic do
def assert_parsed(input, bool = true)
(Chronic.parse(input) != nil).should == bool
end
it "doesn't seem to like timezones" do
assert_parsed('11/15/2013 11:56 PST', false)
assert_parsed('11/15/2013 11:56 -0400', false)
assert_parsed('11/15/2013 11:56')
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment