Sha256: 312bdc31e20f080d737b03598203ded6a0461d165b2a249e93512f4816a5cefb
Contents?: true
Size: 1.03 KB
Versions: 1
Compression:
Stored size: 1.03 KB
Contents
require "test_helper" class WordWrapTest < PropertyTest attr_reader :word_wrap context "always" do setup do @word_wrap = Rocx::Properties::WordWrap.new(:on) end should "have the right tag" do assert_equal :wordWrap, word_wrap.tag end should "have the right name" do assert_equal "word_wrap", word_wrap.name end end context "when the value is on, it" do setup do @word_wrap = Rocx::Properties::WordWrap.new(:on) end should "return XML to that effect" do assert_equal "<w:wordWrap w:val=\"on\"/>", xml(word_wrap) end end context "when the value is off, it" do setup do @word_wrap = Rocx::Properties::WordWrap.new(:off) end should "return XML to that effect" do assert_equal "<w:wordWrap w:val=\"off\"/>", xml(word_wrap) end end context "when the value is nil, it" do setup do @word_wrap = Rocx::Properties::WordWrap.new(nil) end should "not return XML" do assert_equal "", xml(word_wrap) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rocx-0.5.6 | test/properties/word_wrap_test.rb |