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