Sha256: 5ac5f7517c08781b73039a770e2d42a6a64b6ed3fd60cf21bfcaa05825469832

Contents?: true

Size: 581 Bytes

Versions: 16

Compression:

Stored size: 581 Bytes

Contents

describe 'UIColor (CSS)' do

  it "should return css color names" do
    except_for = [:aqua, :fuchsia, :lime]
    Symbol.css_colors.each do |name, val|
      next if except_for.include? name

      color = val.uicolor
      color.css_name.should == name
      color.to_s.should == "UIColor.color(#{name.inspect})"
    end
  end

  it "should return UIColor objects" do
    Symbol.uicolors.each do |name, method|
      name.uicolor.should == UIColor.send(method)
    end
    Symbol.css_colors.each do |name, val|
      name.uicolor.is_a?(UIColor).should == true
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
sugarcube-0.18.16 spec/uicolor_css_spec.rb
sugarcube-0.18.12 spec/uicolor_css_spec.rb
sugarcube-0.18.11 spec/uicolor_css_spec.rb
sugarcube-0.18.10 spec/uicolor_css_spec.rb
sugarcube-0.18.9 spec/uicolor_css_spec.rb
sugarcube-0.18.8 spec/uicolor_css_spec.rb
sugarcube-0.18.7 spec/uicolor_css_spec.rb
sugarcube-0.18.6 spec/uicolor_css_spec.rb
sugarcube-0.18.5 spec/uicolor_css_spec.rb
sugarcube-0.18.4 spec/uicolor_css_spec.rb
sugarcube-0.18.3 spec/uicolor_css_spec.rb
sugarcube-0.18.2 spec/uicolor_css_spec.rb
sugarcube-0.18.1 spec/uicolor_css_spec.rb
sugarcube-0.18.0 spec/uicolor_css_spec.rb
sugarcube-0.16.9 spec/uicolor_css_spec.rb
sugarcube-0.16.5 spec/uicolor_css_spec.rb