Tests both nobreak and nobreak_regex, since one is only useful with the other.
Source Code
# File action_mailer/vendor/text-format-0.6.3/text/format.rb, line 1258 def test_nobreak assert_nothing_raised { @format_o = Text::Format.new } assert(!@format_o.nobreak) assert(@format_o.nobreak_regex.empty?) assert_nothing_raised { @format_o.nobreak = true @format_o.nobreak_regex = { '^this$' => '^continent$' } @format_o.columns = 77 } assert(@format_o.nobreak) assert_equal({ '^this$' => '^continent$' }, @format_o.nobreak_regex) assert_match(/^this continent/, @format_o.format(GETTYSBURG).split("\n")[1]) end
<code/>and<pre/>for code samples.