Sha256: 6f018887a97793c0ef0a36d2e1e31fbdcf67379f0f0d5feb35d44ba31f2ce9b3
Contents?: true
Size: 906 Bytes
Versions: 1
Compression:
Stored size: 906 Bytes
Contents
require "test_helper" class BoldTest < PropertyTest attr_reader :bold context "always" do setup do @bold = Rocx::Properties::Bold.new(false) end should "have the right tag" do assert_equal :b, bold.tag end should "have the right name" do assert_equal "bold", bold.name end end context "when the value is true, it" do setup do @bold = Rocx::Properties::Bold.new(true) end should "return XML" do assert_equal "<w:b/>", xml(bold) end end context "when the value is false, it" do setup do @bold = Rocx::Properties::Bold.new(false) end should "not return XML" do assert_equal "", xml(bold) end end context "when the value is nil, it" do setup do @bold = Rocx::Properties::Bold.new(nil) end should "not return XML" do assert_equal "", xml(bold) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rocx-0.5.6 | test/properties/bold_test.rb |