spec/ftp_spec.rb in carrierwave-ftp-0.2.8 vs spec/ftp_spec.rb in carrierwave-ftp-0.3.0

- old
+ new

@@ -94,15 +94,17 @@ @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')) + @ftp.should_receive(:chdir).with('~/public_html/uploads') + @ftp.should_receive(:get).with('test.jpg', nil).and_yield('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')) + @ftp.should_receive(:chdir).with('~/public_html/uploads') + @ftp.should_receive(:get).with('test.jpg', nil).and_yield('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'))