Sha256: b534a31fd15e2a446e02295a0733cd224ad89163ddf23cb3884a619713aa656b
Contents?: true
Size: 787 Bytes
Versions: 1
Compression:
Stored size: 787 Bytes
Contents
require 'spec_helper' describe Shoes::Common::StyleNormalizer do subject { Shoes::Common::StyleNormalizer.new } it 'does not modify a simple hash' do input = {left: 100, width: 233} expect(subject.normalize(input)).to eq input end it 'turns hexcodes for fill into colors' do input = {fill: 'ffffff'} expected = {fill: Shoes::Color.new(255, 255, 255)} expect(subject.normalize(input)).to eq expected end it 'turns hexcodes for stroke into colors' do input = {stroke: 'ffffff'} expected = {stroke: Shoes::Color.new(255, 255, 255)} expect(subject.normalize(input)).to eq expected end it 'does not modify the original hash' do input = {stroke: '333333'} subject.normalize input expect(input).to eq(stroke: '333333') end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shoes-core-4.0.0.pre7 | spec/shoes/common/style_normalizer_spec.rb |