Skip to content

Instantly share code, notes, and snippets.

@tenderlove
Forked from myronmarston/output
Created February 8, 2011 03:02
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 tenderlove/815769 to your computer and use it in GitHub Desktop.
Save tenderlove/815769 to your computer and use it in GitHub Desktop.
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
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