Sha256: 3b9649bb622cf80d89b683b51094c9a6071f4fccfa0afa263cc722d737ebb281

Contents?: true

Size: 846 Bytes

Versions: 16

Compression:

Stored size: 846 Bytes

Contents

require "spec_helper"

describe Asset do

  before(:each) do
    @script_asset = Asset.new("app/scripts/app.js")
    @style_asset = Asset.new("app/styles/app.css")
    @dest_asset = Asset.new("public/app.js")
  end

  it "should return right logical_path" do
    @script_asset.logical_path.should == "app.js"
    @style_asset.logical_path.should == "app.css"
  end

  it "should return right digest_path" do
    @dest_asset.digest_path.should == "public/app-7fa4c57f63cf67c15299ee2c79be22e0.js"
    @dest_asset.relative_digest_path.should == "/app-7fa4c57f63cf67c15299ee2c79be22e0.js"
  end

  it "should be javascript" do
    @script_asset.javascript?.should be_true
    @style_asset.stylesheet?.should be_true
  end

  it "should wrapperable" do
    @script_asset.wrappable?.should be_true
    @style_asset.wrappable?.should be_false
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
linner-0.7.3 spec/linner/asset_spec.rb
linner-0.7.2 spec/linner/asset_spec.rb
linner-0.7.1 spec/linner/asset_spec.rb
linner-0.7.0 spec/linner/asset_spec.rb
linner-0.6.7 spec/linner/asset_spec.rb
linner-0.6.6 spec/linner/asset_spec.rb
linner-0.6.5 spec/linner/asset_spec.rb
linner-0.6.4 spec/linner/asset_spec.rb
linner-0.6.3 spec/linner/asset_spec.rb
linner-0.6.2 spec/linner/asset_spec.rb
linner-0.6.1 spec/linner/asset_spec.rb
linner-0.6.0 spec/linner/asset_spec.rb
linner-0.5.1 spec/linner/asset_spec.rb
linner-0.5.0 spec/linner/asset_spec.rb
linner-0.4.6 spec/linner/asset_spec.rb
linner-0.4.5 spec/linner/asset_spec.rb