Sha256: c0b3c6cf9b98434a2a41171938e0d06a444767361aae3328be7bcf7a86d68c58

Contents?: true

Size: 706 Bytes

Versions: 2

Compression:

Stored size: 706 Bytes

Contents

require "spec_helper"

describe OpenXml::DrawingML::Elements::Extents do
  include ElementTestMacros

  it_should_use tag: :ext, name: "extents"

  attributes = { extent_length: :cx, extent_width: :cy }

  for_attribute(:extent_length, displays_as: :cx) do
    with_value(1) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_values([-1, 1.1, :not_a_number]) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:extent_width, displays_as: :cy) do
    with_value(1) do
      it_should_assign_successfully
      it_should_output_regular_xml
    end

    with_values([-1, 1.1, :not_a_number]) 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/drawingml/extents_spec.rb
openxml-docx-0.10.0 spec/elements/drawingml/extents_spec.rb