spec/ftp_spec.rb in carrierwave-ftp-0.2.4 vs spec/ftp_spec.rb in carrierwave-ftp-0.2.5
- old
+ new
@@ -87,9 +87,14 @@
it "returns the size of the file" do
@ftp.should_receive(:size).and_return(14)
@stored.size.should == 14
end
+ it "returns to_file" do
+ @stored.should_receive(:file).and_return(Struct.new(:body).new('some content'))
+ @stored.to_file.size.should == 'some content'.length
+ end
+
it "returns the content of the file" do
@stored.should_receive(:file).and_return(Struct.new(:body).new('some content'))
@stored.read.should == 'some content'
end