Created
August 30, 2009 14:52
-
-
Save kaichen/177996 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Crack bug | |
# Crack use YAML paser to parse json data, and YAML parser cloud not parse colon symbol well. | |
# brianmario's fork would be better, http://github.com/brianmario/crack | |
# Fail | |
should "should be able to parse a JSON includes colon" do | |
data = %q![{"foo":{"bar":"2009-08-30 : 22:49"}}]! | |
lambda { | |
Crack::JSON.parse(data) | |
}.should_not raise_error(Crack::ParseError) | |
end | |
# Pass | |
should "should be able to parse a JSON includes colon" do | |
data = %q![{"foo":{"bar":"2009-08-30 : 22:49"}}]! | |
lambda { | |
::JSON.parse(data) | |
}.should_not raise_error | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment