public Method

TestText__Format.test_body_indent

Tests both body_indent and body_indent=

Source Code

# File action_mailer/vendor/text-format-0.6.3/text/format.rb, line 1076
def test_body_indent
  assert_nothing_raised { @format_o = Text::Format.new }
  assert_equal(0, @format_o.body_indent)
  assert_nothing_raised { @format_o.body_indent = 7 }
  assert_equal(7, @format_o.body_indent)
  assert_nothing_raised { @format_o.body_indent = -3 }
  assert_equal(3, @format_o.body_indent)
  assert_nothing_raised { @format_o.body_indent = "9" }
  assert_equal(9, @format_o.body_indent)
  assert_nothing_raised { @format_o.body_indent = "-2" }
  assert_equal(2, @format_o.body_indent)
  assert_match(/^  [^ ]/, @format_o.format(GETTYSBURG).split("\n")[1])
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.