require "spec_helper" describe OpenXml::Docx::Properties::Indentation do include PropertyTestMacros it_should_use tag: :ind, name: "indentation" for_attribute(:end) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:end_characters) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:first_line) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:first_line_characters) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:hanging) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:hanging_characters) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:start) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:start_characters) do with_value(1220) do it_should_assign_successfully it_should_output "" end with_value(-1220) do it_should_assign_successfully it_should_output "" end with_value(1220.3) do it_should_raise_an_exception end with_value(:bad) do it_should_raise_an_exception end end with_no_attributes_set do it_should_output "", assign: false end with_these_attributes_set(start_characters: 44, hanging: 1200) do it_should_output "", assign: false end end