spec/asset_spec.rb in trackman-0.0.6 vs spec/asset_spec.rb in trackman-0.0.8

- old
+ new

@@ -55,14 +55,12 @@ end it "returns a remote asset equal to the previous one" do local = TestAsset.maintenance_page - AppCreator.create remote = local.to_remote - AppCreator.reset - + local.should eq(remote) remote.is_a?(RemoteAsset).should be_true end end @@ -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