Sha256: 8d8da7c0936319ae1e4e4841a80a118da5d22d17a1a1d47c35e076bf80c3ac54
Contents?: true
Size: 670 Bytes
Versions: 28
Compression:
Stored size: 670 Bytes
Contents
require 'spec_helper' describe 'Text' do it "should parse text layer" do psd = PSD.new('spec/files/text.psd') psd.parse! text = psd.tree.children.first.text text.should be_an_instance_of(Hash) expect(text[:value]).to eq('Test') end it "can be exported as CSS" do psd = PSD.new('spec/files/text.psd') psd.parse! type = psd.tree.children.first.type css = type.to_css expect(css).to be_an_instance_of(String) expect(css).to include 'MyriadPro-Regular' expect(css).to include '37.0pt' expect(css).to include 'rgba(24, 24, 24, 255)' css.split(/\n/).each do |c| expect(c[-1]).to eq(";") end end end
Version data entries
28 entries across 28 versions & 2 rubygems