Sha256: e72d169c983aa167fb69698ef3152e17813ef7d1ee2eab32a62c3259d27c3388
Contents?: true
Size: 1.09 KB
Versions: 8
Compression:
Stored size: 1.09 KB
Contents
require "spec_helper" describe OpenXml::Docx::Properties::TableBorders do include PropertyTestMacros it_should_use tag: :tblBorders, name: "table_borders" context "when trying to add borders, it" do before(:each) do @instance = described_class.new end it "should raise an exception if the border to be added isn't a border at all" do expect { instance << [] }.to raise_error(ArgumentError) end end context "when there are no borders" do before(:each) do @instance = described_class.new end it "should not output any XML" do expect(xml(instance)).to eq("") end end context "when there are borders" do before(:each) do @instance = described_class.new instance << OpenXml::Docx::Properties::TableBorder.new(:start, :babyPacifier) instance << OpenXml::Docx::Properties::TableBorder.new(:end, :babyPacifier) end it "should output the correct XML" do expect(xml(instance)).to eq("<w:tblBorders>\n <w:start w:val=\"babyPacifier\"/>\n <w:end w:val=\"babyPacifier\"/>\n </w:tblBorders>") end end end
Version data entries
8 entries across 8 versions & 1 rubygems