forked from sup-heliotrope/sup
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge sup-heliotrope#16: Fix YAML regression in 1.9
Squashed commit of the following: commit a26b99c64e2da4115ea47606ae8b66f0b008b002 Author: Whyme Lyu <[email protected]> Date: Tue Mar 26 23:03:50 2013 +0800 Ensure Syck is used. In the long run we'd better drop Syck in favor of Psych commit a99a2b244063c2088d91688f667ee68f05f24df0 Author: Whyme Lyu <[email protected]> Date: Tue Mar 26 23:03:25 2013 +0800 A regression test for YAMLing in 1.9
- Loading branch information
Showing
3 changed files
with
20 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ | |
|
||
require 'rubygems' | ||
require 'highline/import' | ||
require 'yaml' | ||
require 'trollop' | ||
require "sup" | ||
|
||
|
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
require 'test/unit' | ||
|
||
# Requiring 'yaml' before 'sup' in 1.9.x would get Psych loaded first | ||
# and becoming the default yamler. | ||
require 'yaml' | ||
require 'sup' | ||
|
||
module Redwood | ||
class TestYamlRegressions < Test::Unit::TestCase | ||
def test_yamling_hash | ||
hsh = {:foo => 42} | ||
reloaded = YAML.load(hsh.to_yaml) | ||
|
||
assert_equal reloaded, hsh | ||
end | ||
end | ||
end |