Sha256: f2e08ce5cd86b51e769cc269031b88950c08c9e255d4c701db1f5e4835ebb9ae

Contents?: true

Size: 1.08 KB

Versions: 5

Compression:

Stored size: 1.08 KB

Contents

require "spec_helper"

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

  it_should_use tag: :tailEnd, name: "tail_end"

  for_attribute(:length) do
    %i(lg med sm).each do |allowed_value|
      with_value(allowed_value) do
        it_should_assign_successfully
        it_should_output "<a:tailEnd len=\"#{allowed_value}\"/>"
      end
    end

    with_value(:bad_value) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:type) do
    %i(arrow diamond none oval stealth triangle).each do |allowed_value|
      with_value(allowed_value) do
        it_should_assign_successfully
        it_should_output "<a:tailEnd type=\"#{allowed_value}\"/>"
      end
    end

    with_value(:bad_value) do
      it_should_raise_an_exception
    end
  end

  for_attribute(:width) do
    %i(lg med sm).each do |allowed_value|
      with_value(allowed_value) do
        it_should_assign_successfully
        it_should_output "<a:tailEnd w=\"#{allowed_value}\"/>"
      end
    end

    with_value(:bad_value) 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/drawingml/tail_end_spec.rb
openxml-docx-0.10.5 spec/elements/drawingml/tail_end_spec.rb
openxml-docx-0.10.4 spec/elements/drawingml/tail_end_spec.rb
openxml-docx-0.10.3 spec/elements/drawingml/tail_end_spec.rb
openxml-docx-0.10.2 spec/elements/drawingml/tail_end_spec.rb