Sha256: 3f7489b5430243e7941a0def1e261550ff8cc6f8c1ecf4e7a796ee470415d773
Contents?: true
Size: 612 Bytes
Versions: 3
Compression:
Stored size: 612 Bytes
Contents
require 'spec_helper' require 'rubyXL/convenience_methods/color' describe RubyXL::RgbColor do describe '.to_s' do it 'should properly translate RGB color to string' do rgb_color = RubyXL::RgbColor.new rgb_color.r = 1 rgb_color.g = 2 rgb_color.b = 255 expect(rgb_color.to_s).to eq('0102ff') end it 'should properly translate RGB color with alpha value to string' do rgb_color = RubyXL::RgbColor.new rgb_color.r = 11 rgb_color.g = 22 rgb_color.b = 33 rgb_color.a = 255 expect(rgb_color.to_s).to eq('0b1621ff') end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubyXL-3.4.27 | spec/lib/rgb_color_spec.rb |
rubyXL-3.4.26 | spec/lib/rgb_color_spec.rb |
rubyXL-3.4.25 | spec/lib/rgb_color_spec.rb |