1 require File.join( File.dirname(__FILE__), "..", "..", "spec_helper" )
3 describe Mart::Asset do
5 it "should provide an extension" do
6 @asset = Mart::Asset.new
7 @asset.filename = "fish.pdf"
8 @asset.extension.should == "pdf"
10 @asset.filename = "document.html.erb"
11 @asset.extension.should == "erb"
12 @asset.extension.should_not == "html"
15 it "should provide a filename without extension" do
16 @asset = Mart::Asset.new
17 @asset.filename = "fish.pdf"
18 @asset.filename_base.should == "fish"
21 it "should provide a relative path" do
22 @asset = Mart::Asset.new
23 @asset.filename = "a_dogs_life.html"
24 @asset.relative_path.should == "a_dogs_life.html"