public Method

TestText__Format.test_first_indent

Tests both first_indent and first_indent=

Source Code

# File action_mailer/vendor/text-format-0.6.3/text/format.rb, line 1119
def test_first_indent
  assert_nothing_raised { @format_o = Text::Format.new }
  assert_equal(4, @format_o.first_indent)
  assert_nothing_raised { @format_o.first_indent = 7 }
  assert_equal(7, @format_o.first_indent)
  assert_nothing_raised { @format_o.first_indent = -3 }
  assert_equal(3, @format_o.first_indent)
  assert_nothing_raised { @format_o.first_indent = "9" }
  assert_equal(9, @format_o.first_indent)
  assert_nothing_raised { @format_o.first_indent = "-2" }
  assert_equal(2, @format_o.first_indent)
  assert_match(/^  [^ ]/, @format_o.format(GETTYSBURG).split("\n")[0])
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.