-
-
Save tenderlove/815769 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Run options: --seed 27810 | |
| # Running tests: | |
| F. | |
| Finished tests in 0.003334s, 599.8800 tests/s, 599.8800 assertions/s. | |
| 1) Failure: | |
| test_syck(SadnessTest) [yaml_bug.rb:14]: | |
| Expected "1\n \n2", not "1\n\n2". | |
| 2 tests, 2 assertions, 1 failures, 0 errors, 0 skips |
This file contains hidden or 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
| require 'psych' | |
| require 'yaml' | |
| require 'minitest/autorun' | |
| # Ensure Syck is the default | |
| YAML::ENGINE.yamler = 'syck' | |
| class SadnessTest < MiniTest::Unit::TestCase | |
| def setup | |
| @string = "1\n \n2" | |
| end | |
| def test_syck | |
| assert_equal @string, YAML.load(YAML.dump(@string)) | |
| end | |
| def test_psych | |
| assert_equal @string, Psych.load(Psych.dump(@string)) | |
| end | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment