Sha256: 6c133e2e60fa62a71000b6bda43f2ac01b353d39c2cf2575e1626eb4fd4bbe61
Contents?: true
Size: 708 Bytes
Versions: 64
Compression:
Stored size: 708 Bytes
Contents
# encoding: utf-8 require 'spec_helper' require 'fedux_org_stdlib/colors/html_color' RSpec.describe FeduxOrgStdlib::Colors::HtmlColor do context '#valid?' do it 'suceeds if string is valid html color' do expect(FeduxOrgStdlib::Colors::HtmlColor.new('#11aa11')).to be_valid end it 'fails if color does not start with #' do expect(FeduxOrgStdlib::Colors::HtmlColor.new('111111')).not_to be_valid end it 'fails if length is invalid' do expect(FeduxOrgStdlib::Colors::HtmlColor.new('#111111111')).not_to be_valid end it 'fails if no hex number is given' do expect(FeduxOrgStdlib::Colors::HtmlColor.new('#ZZAAZZ')).not_to be_valid end end end
Version data entries
64 entries across 64 versions & 1 rubygems