Sha256: 6de6e5ed70d70f941db72333866df1572ad24cd29176dcea897b13d4b8309617
Contents?: true
Size: 692 Bytes
Versions: 5
Compression:
Stored size: 692 Bytes
Contents
require File.dirname(__FILE__) + '/spec_helper' describe Net do it 'should respond to the new methods' do Net.should respond_to(*%w(download download_and_save)) end it 'should raise an exception on 404' do lambda { Net::download('http://www.google.com/pickles.html') }.should raise_error end it 'should raise an exception when trying to save an empty path' do lambda { Net::download_and_save('http://www.google.com/','') }.should raise_error end it 'should not write anything to the disk if not success' do begin Net::download_and_save('http://www.google.com/pickles.html') rescue end File.exists?('pickles.html').should be_false end end
Version data entries
5 entries across 5 versions & 2 rubygems