Sha256: 0b4372a02e5d3dd9922f33b04780253a4247f9a02e2893ccbdca142b44d17aae
Contents?: true
Size: 831 Bytes
Versions: 5
Compression:
Stored size: 831 Bytes
Contents
require File.expand_path('../../spec_helper.rb', __FILE__) describe DryCss::CSS do before(:all) do file_name = 'file://' + File.expand_path(File.dirname(__FILE__)) + '/../fixtures/example.css' @css = DryCss::CSS.new(file_name) end it 'returns a CSSParser object' do @css.parser.should be_a(DryCss::Parser) end it 'returns array of color values' do @css.colors.should eq({:counts => {:"#fff;"=>1, :"#000;"=>2}, :total => 3}) end it 'handles multiple uris' do file_name = 'file://' + File.expand_path(File.dirname(__FILE__)) + '/../fixtures/example.css' file_name2 = 'file://' + File.expand_path(File.dirname(__FILE__)) + '/../fixtures/example2.css' @css = DryCss::CSS.new(file_name, file_name2) @css.colors.should eq({:counts => {:"#fff;"=>2, :"#000;"=>4}, :total => 6}) end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
dry_css-0.0.7 | spec/lib/css_spec.rb |
dry_css-0.0.6 | spec/lib/css_spec.rb |
dry_css-0.0.5 | spec/lib/css_spec.rb |
dry_css-0.0.4 | spec/lib/css_spec.rb |
dry_css-0.0.3 | spec/lib/css_spec.rb |