Fix a few missed renames
[merb_mart.git] / spec / models / asset_spec.rb
blobb4e485bb1a42cd73bf0d0ab7aeae7120a23f30fb
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"
13   end
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"
19   end
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"
25   end
27 end