spec/ftp_spec.rb in carrierwave-ftp-0.2.0 vs spec/ftp_spec.rb in carrierwave-ftp-0.2.1

- old
+ new

@@ -88,10 +88,15 @@ @ftp.should_receive(:size).and_return(14) @stored.size.should == 14 end it "returns the content of the file" do - @stored.should_receive(:http_get_body).with(@stored.url).and_return('some content') + @stored.should_receive(:file).and_return(Struct.new(:body).new('some content')) @stored.read.should == 'some content' + end + + it "returns the content_type of the file" do + @stored.should_receive(:file).and_return(Struct.new(:content_type).new('some/type')) + @stored.content_type.should == 'some/type' end end end