Sha256: b0a1b634c204b18e2dfe95ee50d6e04443b9d0fe0c5e6b1c3b9bae8e958c0972
Contents?: true
Size: 704 Bytes
Versions: 56
Compression:
Stored size: 704 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
56 entries across 56 versions & 1 rubygems