Sha256: a094f841c2e950aba39f4d899e529460ea992e5a975e12f5625ae874e2dd91a4

Contents?: true

Size: 429 Bytes

Versions: 5

Compression:

Stored size: 429 Bytes

Contents

require 'rubygems'
require 'rubyXL'

describe RubyXL::Color do
  describe '.validate_color' do
    it 'should return true if a valid hex color without a # is passed' do
      expect(RubyXL::Color.validate_color('0fbCAd')).to eq(true)
    end

    it 'should cause an error if an invalid hex color code or one with a # is passed' do
      expect {RubyXL::Color.validate_color('#G')}.to raise_error(RuntimeError)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubyXL-3.3.15 spec/lib/color_spec.rb
rubyXL-3.3.14 spec/lib/color_spec.rb
rubyXL-3.3.13 spec/lib/color_spec.rb
rubyXL-3.3.12 spec/lib/color_spec.rb
rubyXL-3.3.11 spec/lib/color_spec.rb