spec/asset_spec.rb in trackman-0.1.1 vs spec/asset_spec.rb in trackman-0.1.2

- old
+ new

@@ -44,12 +44,10 @@ file = File.open path asset.file_hash.should eq(Digest::MD5.hexdigest(file.read)) end end - - describe "#remote" do class TestAsset < Asset def self.maintenance_page Asset.create(:path => 'spec/test_data/sample.html') @@ -93,7 +91,23 @@ dependent = Asset.create(:path => 'spec/test_data/css/with-asset.css') dependency = dependent.assets.first (dependent <=> dependency).should == 1 (dependency <=> dependent).should == -1 + end + + it "fixes the bug with realpath" do + class MyAsset < Asset + def validate_path? + false + end + def file_hash + 123 + end + end + + local = MyAsset.new(:path => 'public/test.html') + remote = MyAsset.new(:path => 'public/./test.html') + + local.should == remote end end \ No newline at end of file