Sha256: 4e815f273d5d4ea41a6a30a5fa4cb842f71dacb9cb712f73ec0e5bd802db4a96

Contents?: true

Size: 518 Bytes

Versions: 4

Compression:

Stored size: 518 Bytes

Contents

require "spec_helper"

describe Crush::Packr do
  specify { Crush::Packr.default_mime_type.should == "application/javascript" }
  
  it "compresses using Packr" do
    ::Packr.should_receive(:pack).with("hello", {}).and_return("world")
    Crush::Packr.compress("hello").should == "world"
  end
  
  it "is registered with Tilt" do
    ::Packr.should_receive(:pack).with("hello", {}).and_return("world")
    Tilt.register Crush::Packr, "js"
    Tilt.new("application.js").compress("hello").should == "world"
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
crush-0.3.3 spec/crush/packr_spec.rb
crush-0.3.2 spec/crush/packr_spec.rb
crush-0.3.1 spec/crush/packr_spec.rb
crush-0.3.0 spec/crush/packr_spec.rb