spec/downer/download_item_spec.rb in downer-0.3.1 vs spec/downer/download_item_spec.rb in downer-0.3.2

- old
+ new

@@ -14,9 +14,13 @@ it "should generate a filename from its download url" do item = DownloadItem.new('http://www.urbaninfluence.com/sites/default/files/user_uploads/images/mapsAndAtlases2.png', '/tmp') item.get_save_filename.should == 'mapsAndAtlases2.png' end + it "should successfully encode invalid chars into ASCII equivalents" do + item = DownloadItem.new('http://www.urbaninfluence.com/My File_Name With White space.png', '/tmp') + item.url.should == 'http://www.urbaninfluence.com/My%20File_Name%20With%20White%20space.png' + end it "should restore bad url tokens into valid ascii characters" do item = DownloadItem.new('http://www.urbaninfluence.com/my[place].html', '/tmp') item.get_save_filename.should == 'my[place].html' end \ No newline at end of file