spec/sftp_spec.rb in carrierwave-ftp-0.2.3 vs spec/sftp_spec.rb in carrierwave-ftp-0.2.4
- old
+ new
@@ -50,9 +50,14 @@
sftp.stub(:upload!)
sftp.stub(:close_channel)
@stored = @storage.store!(@file)
end
+ it "should use the calculated URL when retrieving a file" do
+ @stored.should_receive(:url).and_return('http://example.com/')
+ @stored.read
+ end
+
it "returns a url based on directory" do
@stored.url.should == 'http://testcarrierwave.dev/uploads/test.jpg'
end
it "returns a path based on directory" do