Sha256: 1926f187a396a3ecb40366596f07e7b994d4976dbe72ffd0247b6f0ea08ec013

Contents?: true

Size: 826 Bytes

Versions: 2

Compression:

Stored size: 826 Bytes

Contents

require 'spec_helper'

describe Csso do

  it "should optimize css" do
    subject.optimize("a  {\ncolor: white; }").should == "a{color:#fff}"
  end

  it "should optimize structure" do
    subject.optimize("a  {\ncolor: white; } a{color: red;}").should == "a{color:red}"
  end

  it "should optimize structure" do
    pending "original csso is a bit broken at the moment"
    # FIXME: csso produces "a{color:#fff;color:red}" on this :(
    subject.optimize("a  {\ncolor: white; } a{color: #ff0000;}").should == "a{color:red}"
  end

  it "should optimize structure in maniac mode" do
    subject.optimize("a  {\ncolor: white; } a{color: #ff0000;}", true).should == "a{color:red}"
  end

  it 'should produce no error on empty input' do
    subject.optimize(nil).should == nil
    subject.optimize("").should == ""
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
csso-rails-0.0.3 spec/csso/csso_spec.rb
csso-rails-0.0.2 spec/csso/csso_spec.rb