require "spec_helper" describe Rocx::Properties::Frame do include PropertyTestMacros it_should_use tag: :framePr, name: "frame" for_attribute(:anchor_lock) do with_value(true) do it_should_assign_successfully it_should_output "" end with_value(false) do it_should_assign_successfully it_should_output "" end with_value(:maybe) do it_should_raise_an_exception end end for_attribute(:drop_cap) do with_value(:drop) do it_should_assign_successfully it_should_output "" end with_value(:margin) do it_should_assign_successfully it_should_output "" end with_value(:none) do it_should_assign_successfully it_should_output "" end with_value(:bad) do it_should_raise_an_exception end end for_attribute(:height) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-24) do it_should_raise_an_exception end with_value(:big) do it_should_raise_an_exception end end for_attribute(:horizontal_anchor) do with_value(:margin) do it_should_assign_successfully it_should_output "" end with_value(:page) do it_should_assign_successfully it_should_output "" end with_value(:text) do it_should_assign_successfully it_should_output "" end end for_attribute(:height_rule) do with_value(:atLeast) do it_should_assign_successfully it_should_output "" end with_value(:auto) do it_should_assign_successfully it_should_output "" end with_value(:exact) do it_should_assign_successfully it_should_output "" end with_value(:something_bad) do it_should_raise_an_exception end end for_attribute(:horizontal_padding) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_raise_an_exception end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:lines) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_raise_an_exception end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:vertical_anchor) do with_value(:margin) do it_should_assign_successfully it_should_output "" end with_value(:page) do it_should_assign_successfully it_should_output "" end with_value(:text) do it_should_assign_successfully it_should_output "" end with_value(:something_bad) do it_should_raise_an_exception end end for_attribute(:vertical_padding) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_raise_an_exception end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:width) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_raise_an_exception end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:wrap) do with_value(:around) do it_should_assign_successfully it_should_output "" end with_value(:auto) do it_should_assign_successfully it_should_output "" end with_value(:none) do it_should_assign_successfully it_should_output "" end with_value(:notBeside) do it_should_assign_successfully it_should_output "" end with_value(:through) do it_should_assign_successfully it_should_output "" end with_value(:tight) do it_should_assign_successfully it_should_output "" end with_value(:something_bad) do it_should_raise_an_exception end end for_attribute(:horizontal_position) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_assign_successfully it_should_output "" end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:relative_horizontal_position) do with_value(:center) do it_should_assign_successfully it_should_output "" end with_value(:inside) do it_should_assign_successfully it_should_output "" end with_value(:left) do it_should_assign_successfully it_should_output "" end with_value(:outside) do it_should_assign_successfully it_should_output "" end with_value(:right) do it_should_assign_successfully it_should_output "" end with_value(:something_bad) do it_should_raise_an_exception end end for_attribute(:vertical_position) do with_value(24) do it_should_assign_successfully it_should_output "" end with_value(-23) do it_should_assign_successfully it_should_output "" end with_value(19.4) do it_should_raise_an_exception end with_value(:two) do it_should_raise_an_exception end end for_attribute(:relative_vertical_position) do with_value(:bottom) do it_should_assign_successfully it_should_output "" end with_value(:center) do it_should_assign_successfully it_should_output "" end with_value(:inline) do it_should_assign_successfully it_should_output "" end with_value(:inside) do it_should_assign_successfully it_should_output "" end with_value(:outside) do it_should_assign_successfully it_should_output "" end with_value(:top) do it_should_assign_successfully it_should_output "" end with_value(:something_bad) do it_should_raise_an_exception end end end