Sha256: e0294d75641ceda0389d8fabf2907c45381e9562373488158caf6bc8b8d0ed08

Contents?: true

Size: 927 Bytes

Versions: 20

Compression:

Stored size: 927 Bytes

Contents

require "spec_helper"

describe Asset do
  def new_asset path
    Asset.new path
  end

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

  it "should return right logical_path" do
    expect(@script_asset.logical_path).to eq "app.js"
    expect(@style_asset.logical_path).to  eq "app.css"
  end

  it "should return right digest_path" do
    expect(@dest_asset.digest_path).to eq "public/app-7fa4c57f63cf67c15299ee2c79be22e0.js"
    expect(@dest_asset.relative_digest_path).to eq "/app-7fa4c57f63cf67c15299ee2c79be22e0.js"
  end

  it "should be javascript" do
    expect(@script_asset.javascript?).to be true
    expect(@style_asset.stylesheet?).to  be true
  end

  it "should wrapperable" do
    expect(@script_asset.wrappable?).to be true
    expect(@style_asset.wrappable?).to  be false
  end
end

Version data entries

20 entries across 20 versions & 2 rubygems

Version Path
linner-hc-1.0.0 spec/linner/asset_spec.rb
linner-0.12.0 spec/linner/asset_spec.rb
linner-0.11.6 spec/linner/asset_spec.rb
linner-0.11.5 spec/linner/asset_spec.rb
linner-0.11.4 spec/linner/asset_spec.rb
linner-0.11.3 spec/linner/asset_spec.rb
linner-0.11.2 spec/linner/asset_spec.rb
linner-0.11.1 spec/linner/asset_spec.rb
linner-0.11.0 spec/linner/asset_spec.rb
linner-0.10.0 spec/linner/asset_spec.rb
linner-0.9.1 spec/linner/asset_spec.rb
linner-0.9.0 spec/linner/asset_spec.rb
linner-0.8.7 spec/linner/asset_spec.rb
linner-0.8.6 spec/linner/asset_spec.rb
linner-0.8.5 spec/linner/asset_spec.rb
linner-0.8.4 spec/linner/asset_spec.rb
linner-0.8.3 spec/linner/asset_spec.rb
linner-0.8.2 spec/linner/asset_spec.rb
linner-0.8.1 spec/linner/asset_spec.rb
linner-0.8.0 spec/linner/asset_spec.rb