Sha256: 4965560bd4f93dd3e9e1b968037aa93e7b166fac1a3de356150abaf9c3042fb7

Contents?: true

Size: 950 Bytes

Versions: 5

Compression:

Stored size: 950 Bytes

Contents

require "spec_helper"

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

  it_should_use tag: :compatSetting, name: "compatibility_setting"

  for_attribute(:setting_name) do
    with_value("A String") do
      it_should_assign_successfully
      it_should_output "<w:compatSetting w:name=\"A String\"/>"
    end

    with_values([0, :not_a_string]) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:uri) do
    with_value("A String") do
      it_should_assign_successfully
      it_should_output "<w:compatSetting w:uri=\"A String\"/>"
    end

    with_values([0, :not_a_string]) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:value) do
    with_value("A String") do
      it_should_assign_successfully
      it_should_output "<w:compatSetting w:val=\"A String\"/>"
    end

    with_values([0, :not_a_string]) do
      it_should_raise_an_exception
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
openxml-docx-0.10.6 spec/elements/compatibility_setting_spec.rb
openxml-docx-0.10.5 spec/elements/compatibility_setting_spec.rb
openxml-docx-0.10.4 spec/elements/compatibility_setting_spec.rb
openxml-docx-0.10.3 spec/elements/compatibility_setting_spec.rb
openxml-docx-0.10.2 spec/elements/compatibility_setting_spec.rb