0
@@ -15,8 +15,8 @@ module AttachmentFu
0
@asset = BasicAsset.new(:content_type => 'application/x-ruby', :temp_path => __FILE__)
0
- it "has nil #full_filename" do
0
- @asset.full_filename.should be_nil
0
+ it "has nil #full_path" do
0
+ @asset.full_path.should be_nil
0
it "has nil #partitioned_path" do
0
@@ -56,16 +56,16 @@ module AttachmentFu
0
it "stores asset in AttachmentFu root_path" do
0
- @asset.full_
filename.should == File.expand_path(File.join(AttachmentFu.root_path, "public/afu_spec_assets/#{@asset.partitioned_path * '/'}/guinea_pig.rb"))
0
+ @asset.full_
path.should == File.expand_path(File.join(AttachmentFu.root_path, "public/afu_spec_assets/#{@asset.partitioned_path * '/'}/guinea_pig.rb"))
0
it "creates full_path from record id and attachment_path" do
0
- @asset.full_path.should == File.expand_path(File.join(AttachmentFu.root_path, "public/afu_spec_assets/#{@asset.partitioned_path * '/'}
"))
0
+ @asset.full_path.should == File.expand_path(File.join(AttachmentFu.root_path, "public/afu_spec_assets/#{@asset.partitioned_path * '/'}
/#{@asset.filename}"))
0
@asset.full_path("foo", "bar").should == File.expand_path(File.join(AttachmentFu.root_path, "public/afu_spec_assets/#{@asset.partitioned_path * '/'}/foo/bar"))
0
it "creates public_path from record id and attachment_path" do
0
- @asset.public_path.should == "/afu_spec_assets/#{@asset.partitioned_path * '/'}
"
0
+ @asset.public_path.should == "/afu_spec_assets/#{@asset.partitioned_path * '/'}
/#{@asset.filename}"
0
@asset.public_path("foo", "bar").should == "/afu_spec_assets/#{@asset.partitioned_path * '/'}/foo/bar"
0
@@ -75,7 +75,7 @@ module AttachmentFu
0
it "moves temp_path to new location" do
0
- File.exist?(@asset.full_
filename).should == true
0
+ File.exist?(@asset.full_
path).should == true
0
it "removes old temp_path location" do
0
@@ -93,7 +93,7 @@ module AttachmentFu
0
FileUtils.cp __FILE__, @file
0
@asset = BasicAsset.create!(:content_type => 'application/x-ruby', :temp_path => @file)
0
- @dir = File.dirname(@asset.full_
filename)
0
+ @dir = File.dirname(@asset.full_
path)
0
@@ -102,7 +102,7 @@ module AttachmentFu
0
it "removes the file" do
0
- File.exist?(@asset.full_
filename).should == false
0
+ File.exist?(@asset.full_
path).should == false
Comments
No one has commented yet.