blob: 5aacbf1745ae76435b1e96b1feb354a334593c06 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
require 'testing_env'
require 'extend/string'
class StringTest < Test::Unit::TestCase
def test_undent
undented = <<-EOS.undent
hi
....my friend over
there
EOS
assert_equal "hi\nmy friend over\nthere\n", undented
end
def test_undent_not_indented
undented = <<-EOS.undent
hi
I'm not indented
EOS
assert_equal "hi\nI'm not indented\n", undented
end
end
|