Sha256: 8af8224e83bfaf766f9a850cb551913c5d39033c3b7ea8c6c15e6bfe835ff655

Contents?: true

Size: 720 Bytes

Versions: 8

Compression:

Stored size: 720 Bytes

Contents

require "spec_helper"

describe OpenXml::Docx::Properties::ManualWidth do
  include PropertyTestMacros

  it_should_use tag: :fitText, name: "manual_width"

  for_attribute(:id) do
    values = [12, -134]
    it_should_assign_and_output_xml values
    it_should_not_allow_floats
    it_should_not_allow_invalid_value
  end

  for_attribute(:width) do
    it_should_assign_and_output_xml 12
    it_should_not_allow_negative_numbers
    it_should_not_allow_floats
    it_should_not_allow_invalid_value
  end

  with_no_attributes_set do
    it_should_output "", assign: false
  end

  with_these_attributes_set(id: 50, width: 720) do
    it_should_output "<w:fitText w:id=\"50\" w:val=\"720\"/>", assign: false
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
openxml-docx-0.10.6 spec/properties/manual_width_spec.rb
openxml-docx-0.10.5 spec/properties/manual_width_spec.rb
openxml-docx-0.10.4 spec/properties/manual_width_spec.rb
openxml-docx-0.10.3 spec/properties/manual_width_spec.rb
openxml-docx-0.10.2 spec/properties/manual_width_spec.rb
openxml-docx-0.10.1 spec/properties/manual_width_spec.rb
openxml-docx-0.10.0 spec/properties/manual_width_spec.rb
openxml-docx-0.9.0 spec/properties/manual_width_spec.rb