Sha256: 7acbf2d4db863442148b833467c9ade92d157bd2f7a5c5b0d1a0bd0d11447111
Contents?: true
Size: 1.67 KB
Versions: 2
Compression:
Stored size: 1.67 KB
Contents
require "assert" require 'xmlss/style/interior' require 'enumeration/assert_macros' class Xmlss::Style::Interior class UnitTests < Assert::Context include Enumeration::AssertMacros desc "Xmlss::Style::Interior" before { @i = Xmlss::Style::Interior.new } subject { @i } should have_enum :pattern, { :none => "None", :solid => "Solid", :gray75 => "Gray75", :gray50 => "Gray50", :gray25 => "Gray25", :gray125 => "Gray125", :gray0625 => "Gray0625", :horz_stripe => "HorzStripe", :vert_stripe => "VertStripe", :reverse_diag_stripe => "ReverseDiagStripe", :diag_stripe => "DiagStripe", :diag_cross => "DiagCross", :thick_diag_cross => "ThickDiagCross", :thin_horz_stripe => "ThinHorzStripe", :thin_vert_stripe => "ThinVertStripe", :thin_reverse_diag_stripe => "ThinReverseDiagStripe", :thin_diag_stripe => "ThineDiagStripe", :thin_horz_cross => "ThinHorzCross", :thin_diag_cross => "ThinDiagCross" } should have_class_method :writer should have_accessor :color, :pattern_color should "know its writer" do assert_equal :interior, subject.class.writer end should "set it's defaults" do assert_equal nil, subject.color assert_equal nil, subject.pattern assert_equal nil, subject.pattern_color end should "set attributes at init" do i = Xmlss::Style::Interior.new({ :color => "#000000", :pattern => :solid, :pattern_color => "#FF0000" }) assert_equal "#000000", i.color assert_equal "Solid", i.pattern assert_equal "#FF0000", i.pattern_color end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
xmlss-1.0.1 | test/unit/style/interior_tests.rb |
xmlss-1.0.0 | test/unit/style/interior_tests.rb |