Sha256: 55ce0dd6942bbf5cb95d33347c021ec7b068636cbca528fee0c5e760662867dd
Contents?: true
Size: 646 Bytes
Versions: 2
Compression:
Stored size: 646 Bytes
Contents
require_relative "helper" class TestParser < Minitest::Test def test_good_parsing test_file = File.join(File.dirname(__FILE__), 'data', 'test_statement.pdf') json_file = File.join(File.dirname(__FILE__), 'data', 'test_statement.json') statement = CapitalOneStatement.new test_file actual = JSON.parse(statement.to_json) expected = JSON.parse(IO.read(json_file)) assert_equal expected, actual end def test_bad_parsing Dir[File.join(File.dirname(__FILE__), 'data', 'bad_statement*.pdf')].each do |path| assert_raises(RuntimeError) do CapitalOneStatement.new(path) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
parse_capitalone_pdf_statement-1.1.0 | test/test_parser.rb |
parse_capitalone_pdf_statement-1.0.0 | test/test_parser.rb |