summaryrefslogtreecommitdiff
path: root/test/psych/test_psych.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-07-07 15:54:30 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-07-07 15:54:30 -0700
commit56f296ee0b85ecd6956d640bac9ac9620ab44fb7 (patch)
tree3662ee0ff920dc1e968a3282bd747fa9e7898f24 /test/psych/test_psych.rb
parent6f12aff9ec1d01c939179cda117b09e36ef69e2b (diff)
downloadpsych-56f296ee0b85ecd6956d640bac9ac9620ab44fb7.zip
line width option is passed to emitter
Diffstat (limited to 'test/psych/test_psych.rb')
-rw-r--r--test/psych/test_psych.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/psych/test_psych.rb b/test/psych/test_psych.rb
index 42b30a0..81fcccc 100644
--- a/test/psych/test_psych.rb
+++ b/test/psych/test_psych.rb
@@ -8,6 +8,11 @@ class TestPsych < Psych::TestCase
Psych.domain_types.clear
end
+ def test_line_width
+ yml = Psych.dump('123456 7', { :line_width => 5 })
+ assert_match(/^\s*7/, yml)
+ end
+
def test_indent
yml = Psych.dump({:a => {'b' => 'c'}}, {:indentation => 5})
assert_match(/^[ ]{5}b/, yml)