Class: NonString
- Inherits:
-
Test::Unit::TestCase
- Object
- Test::Unit::TestCase
- NonString
- Defined in:
- lib/prettyprint.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#format(width) ⇒ Object
787 788 789 790 791 792 793 |
# File 'lib/prettyprint.rb', line 787 def format(width) PrettyPrint.format([], width, 'newline', lambda {|n| "#{n} spaces"}) {|q| q.text(3, 3) q.breakable(1, 1) q.text(3, 3) } end |
#test_6 ⇒ Object
795 796 797 |
# File 'lib/prettyprint.rb', line 795 def test_6 assert_equal([3, "newline", "0 spaces", 3], format(6)) end |
#test_7 ⇒ Object
799 800 801 |
# File 'lib/prettyprint.rb', line 799 def test_7 assert_equal([3, 1, 3], format(7)) end |