Skip to content

Instantly share code, notes, and snippets.

@weilandia
Created January 25, 2019 06:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weilandia/21485b507ce4f08893a2b1b22858f359 to your computer and use it in GitHub Desktop.
Save weilandia/21485b507ce4f08893a2b1b22858f359 to your computer and use it in GitHub Desktop.
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "roo"
gem "minitest"
end
require "open-uri"
require "roo"
require "minitest/autorun"
class BugTest < Minitest::Test
def test_stuff
raw = open("https://github.com/roo-rb/roo/files/2794813/roo_bad_link.xlsx").read
file = Tempfile.new(["bad_link", ".xlsx"])
file.write(raw)
file.rewind
refute_nil Roo::Spreadsheet.open(file).last_row
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment