Sha256: 6b725aeec0005ade378dd3b100770810e85e300f2f25ada19396d896b6c0fc2a

Contents?: true

Size: 1.16 KB

Versions: 2

Compression:

Stored size: 1.16 KB

Contents

require "spec_helper"

describe Crush do
  describe ".register_js" do
    it "registers all of the JavaScript engines with Tilt" do
      Tilt.mappings.delete "js"
      Crush.register_js
      Tilt.mappings["js"].should == [
        Crush::Uglifier,
        Crush::Closure::Compiler,
        Crush::YUI::JavaScriptCompressor,
        Crush::Packr,
        Crush::JSMin
      ]
    end
  end
  
  describe ".register_css" do
    it "registers all of the CSS engines with Tilt" do
      Tilt.mappings.delete "css"
      Crush.register_css
      Tilt.mappings["css"].should == [
        Crush::YUI::CssCompressor,
        Crush::Rainpress,
        Crush::CSSMin
      ]
    end
  end
  
  describe ".register" do
    it "registers all of the engines with Tilt" do
      Tilt.mappings.delete "js"
      Tilt.mappings.delete "css"
      Crush.register
      Tilt.mappings["js"].should == [
        Crush::Uglifier,
        Crush::Closure::Compiler,
        Crush::YUI::JavaScriptCompressor,
        Crush::Packr,
        Crush::JSMin
      ]
      Tilt.mappings["css"].should == [
        Crush::YUI::CssCompressor,
        Crush::Rainpress,
        Crush::CSSMin
      ]
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
crush-0.3.1 spec/crush_spec.rb
crush-0.3.0 spec/crush_spec.rb