spec/asset_spec.rb in trackman-0.4.2 vs spec/asset_spec.rb in trackman-0.4.3
- old
+ new
@@ -28,19 +28,19 @@
end
describe "#data" do
it "returns content of the file specified by path" do
path = "./spec/spec_helper.rb"
- asset = Asset.new(:path => path)
+ asset = Asset.create(:path => path)
asset.data.should eq(File.open(path).read)
end
end
describe "#hash" do
it "returns the fingerprint of data" do
path = "./spec/spec_helper.rb"
- asset = Asset.new(:path => path)
+ asset = Asset.create(:path => path)
file = File.open path
asset.file_hash.should eq(Digest::MD5.hexdigest(file.read))
end
end
\ No newline at end of file