Sha256: 87a3cb5dec07e97625a65bcbc823cd87ccfb3e9c8567c0f2b818a01e4fd870a2

Contents?: true

Size: 546 Bytes

Versions: 4

Compression:

Stored size: 546 Bytes

Contents

describe 'Symbol#uicolor' 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.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

4 entries across 4 versions & 1 rubygems

Version Path
sugarcube-0.16.2 spec/symbol_uicolor_spec.rb
sugarcube-0.16 spec/symbol_uicolor_spec.rb
sugarcube-0.15.5 spec/symbol_uicolor_spec.rb
sugarcube-0.15.3 spec/symbol_uicolor_spec.rb