Sha256: 401db843d8aa68bdba35429c8cae4df1c9df78fdba187947ee275f42d50a6d5f
Contents?: true
Size: 829 Bytes
Versions: 17
Compression:
Stored size: 829 Bytes
Contents
require 'spec_helper' require 'fedux_org/stdlib/colors/html_color' describe FeduxOrg::Stdlib::Colors::HtmlColor do context '#valid?' do it 'suceeds if string is valid html color' do expect( FeduxOrg::Stdlib::Colors::HtmlColor.new( '#11aa11' ).valid? ).to be_true end it 'fails if color does not start with #' do expect( FeduxOrg::Stdlib::Colors::HtmlColor.new( '111111' ).valid? ).to be_false end it 'fails if length is invalid' do expect( FeduxOrg::Stdlib::Colors::HtmlColor.new( '#111111111' ).valid? ).to be_false end it 'fails if no hex number is given' do expect( FeduxOrg::Stdlib::Colors::HtmlColor.new( '#ZZAAZZ' ).valid? ).to be_false end end end
Version data entries
17 entries across 17 versions & 1 rubygems