public Method

TestText__Format.test_right_margin

There's no documentation for this item.

Source Code

# File action_mailer/vendor/text-format-0.6.3/text/format.rb, line 1307
def test_right_margin
  assert_nothing_raised { @format_o = Text::Format.new }
  assert_equal(0, @format_o.right_margin)
  assert_nothing_raised { @format_o.right_margin = -3 }
  assert_equal(3, @format_o.right_margin)
  assert_nothing_raised { @format_o.right_margin = "9" }
  assert_equal(9, @format_o.right_margin)
  assert_nothing_raised { @format_o.right_margin = "-2" }
  assert_equal(2, @format_o.right_margin)
  assert_nothing_raised { @format_o.right_margin = 7 }
  assert_equal(7, @format_o.right_margin)
  assert_nothing_raised {
    ft = @format_o.format(GETTYSBURG).split("\n")
    assert_match(/^ {4}Four score.*forth on$/, ft[0])
    assert_match(/^November/, ft[-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.