require "spec_helper"
describe Rocx::Properties::Font do
include PropertyTestMacros
it_should_use tag: :rFonts, name: "font"
for_attribute(:ascii) do
with_value("Courier New") do
it_should_assign_successfully
it_should_output ""
end
with_value(1) do
it_should_raise_an_exception
end
with_value(:monospace) do
it_should_raise_an_exception
end
end
for_attribute(:ascii_theme) do
with_value(:majorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:latin) do
it_should_raise_an_exception
end
end
for_attribute(:complex) do
with_value("Courier New") do
it_should_assign_successfully
it_should_output ""
end
with_value(1) do
it_should_raise_an_exception
end
with_value(:monospace) do
it_should_raise_an_exception
end
end
for_attribute(:complex_theme) do
with_value(:majorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:latin) do
it_should_raise_an_exception
end
end
for_attribute(:east_asia) do
with_value("Courier New") do
it_should_assign_successfully
it_should_output ""
end
with_value(1) do
it_should_raise_an_exception
end
with_value(:monospace) do
it_should_raise_an_exception
end
end
for_attribute(:east_asia_theme) do
with_value(:majorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:latin) do
it_should_raise_an_exception
end
end
for_attribute(:high_ansi) do
with_value("Courier New") do
it_should_assign_successfully
it_should_output ""
end
with_value(1) do
it_should_raise_an_exception
end
with_value(:monospace) do
it_should_raise_an_exception
end
end
for_attribute(:high_ansi_theme) do
with_value(:majorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:majorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorAscii) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorBidi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorEastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:minorHAnsi) do
it_should_assign_successfully
it_should_output ""
end
with_value(:latin) do
it_should_raise_an_exception
end
end
for_attribute(:hint) do
with_value(:cs) do
it_should_assign_successfully
it_should_output ""
end
with_value(:default) do
it_should_assign_successfully
it_should_output ""
end
with_value(:eastAsia) do
it_should_assign_successfully
it_should_output ""
end
with_value(:ascii) do
it_should_raise_an_exception
end
end
end