test/test_remote.rb in remote_table-3.0.0.rc2 vs test/test_remote.rb in remote_table-3.0.0

- old
+ new

@@ -2,20 +2,10 @@ require 'helper' require 'tempfile' describe RemoteTable do describe 'used on remote files' do - it "open an XLSX" do - t = RemoteTable.new 'http://www.customerreferenceprogram.org/uploads/CRP_RFP_template.xlsx' - t[5]["Requirements"].must_equal "Secure encryption of all data" - end - - it "does its best to download urls without http://" do - t = RemoteTable.new 'www.customerreferenceprogram.org/uploads/CRP_RFP_template.xlsx' - t[5]["Requirements"].must_equal "Secure encryption of all data" - end - it "add a row hash to every row" do t = RemoteTable.new(:url => 'http://www.customerreferenceprogram.org/uploads/CRP_RFP_template.xlsx') t[5].row_hash.must_equal "06d8a738551c17735e2731e25c8d0461" end @@ -89,14 +79,14 @@ t = RemoteTable.new 'https://openflights.svn.sourceforge.net/svnroot/openflights/openflights/data/airports.dat', :headers => false#, :encoding => 'UTF-8' t[0][1].must_equal 'Goroka' end it "read only certain rows of an XLSX" do - t = RemoteTable.new 'www.customerreferenceprogram.org/uploads/CRP_RFP_template.xlsx', :crop => 11..16, :headers => false + t = RemoteTable.new 'test/data/backup/http___www.customerreferenceprogram.org_uploads_CRP_RFP_template.xlsx', :crop => 11..16, :headers => false t[0][0].must_equal "Permissioning and access groups for all content" t[4][0].must_equal "Manage Multiple Incentive Programs for Participants" - t = RemoteTable.new 'www.customerreferenceprogram.org/uploads/CRP_RFP_template.xlsx', :crop => 11..16, :headers => %w{ col1 } + t = RemoteTable.new 'test/data/backup/http___www.customerreferenceprogram.org_uploads_CRP_RFP_template.xlsx', :crop => 11..16, :headers => %w{ col1 } t[0]['col1'].must_equal "Permissioning and access groups for all content" t[4]['col1'].must_equal "Manage Multiple Incentive Programs for Participants" end it "doesn't get confused by :format => nil" do