Sha256: c8ff28474aa4e04305b923090178243f775e61917cc1540a81693e8dd6ae2fc1

Contents?: true

Size: 627 Bytes

Versions: 2

Compression:

Stored size: 627 Bytes

Contents

require "spec_helper"

describe OpenXml::Docx::Elements::Symbol do
  include ElementTestMacros

  it_should_use tag: :sym, name: "symbol"

  for_attribute(:font, with_namespace: :w) do
    with_value("Wingdings") do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value(123) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:character, with_namespace: :w, displays_as: :char) do
    with_value("43FD") do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_value("43gg") do
      it_should_raise_an_exception
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
openxml-docx-0.10.1 spec/elements/symbol_spec.rb
openxml-docx-0.10.0 spec/elements/symbol_spec.rb