Sha256: dd4bcd718e3b72dc95b57e922454bc4ef808074cfe6a96f9209b423f39df68ee

Contents?: true

Size: 1.21 KB

Versions: 2

Compression:

Stored size: 1.21 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::Sass::Engine,
        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::Sass::Engine,
        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.3 spec/crush_spec.rb
crush-0.3.2 spec/crush_spec.rb