Sha256: 801d511a68fc3b83cae4ce133399ce0c678526ab9e743cbcf632409bb34b02e3

Contents?: true

Size: 800 Bytes

Versions: 3

Compression:

Stored size: 800 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe Asset do

  it "should spawn!" do
    as = Asset.new :js, "cool", "http://cool.js"
    as.should be_instance_of Asset
  end

  describe "Instantiated" do

    let (:as) { Asset.new :js, "sweet", "http://candy.js" }

    it "should have filename" do
      as.filename.should eql("sweet.js")
    end

    it "should have fullpath" do
      as.fullpath.should eql("vendor/assets/javascripts/sweet.js")
    end

    it "should detect version" do
      as.instance_variable_set "@data", "/* foo v 1.5.6 */"
      as.ver[0].should eql("1.5.6")
    end

    it "should print version" do
      as.instance_variable_set "@data", "\u001F\x8B\b\u0000\xF5\u0000"
      as.print_version.should eql("v537c8396f74 ")
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
assetify-1.0.0 spec/assetify/asset_spec.rb
assetify-1.0.0.rc1 spec/assetify/asset_spec.rb
assetify-0.7.0.rc1 spec/assetify/asset_spec.rb