Sha256: 7959186425e5a54f617f68a78823f39fa958d496e16e3a2e7f337c6c92ab24cd
Contents?: true
Size: 551 Bytes
Versions: 49
Compression:
Stored size: 551 Bytes
Contents
require File.expand_path('../../../../spec_helper', __FILE__) require 'rexml/document' describe "REXML::Text#wrap" do before :each do @t = REXML::Text.new("abc def") end it "wraps the text at width" do @t.wrap("abc def", 3, false).should == "abc\ndef" end it "returns the string if width is greater than the size of the string" do @t.wrap("abc def", 10, false).should == "abc def" end it "takes a newline at the beginning option as the third parameter"do @t.wrap("abc def", 3, true).should == "\nabc\ndef" end end
Version data entries
49 entries across 49 versions & 2 rubygems