Sha256: 0f6a7f4360d15e06f9ed5159acce1241be2d592f8bf5c5e6f18b43aeeac1419e

Contents?: true

Size: 615 Bytes

Versions: 3

Compression:

Stored size: 615 Bytes

Contents

require 'simplecov'
SimpleCov.start do
  add_filter 'lib/chess/gnuchess.rb'
end
if ENV['CODECOV_TOKEN']
  require 'codecov'
  SimpleCov.formatter = SimpleCov::Formatter::Codecov
end

require 'chess'
require 'debug'
require 'minitest/autorun'

module TestHelper
  PGN_COLLECTION = 'test/pgn_collection'.freeze
  BIG_PGN_COLLECTION = '/Users/pioz/Code/prog/misc/pgn_collection/pgn'.freeze

  def self.pgns(path, prefix = PGN_COLLECTION)
    Dir[File.join(prefix, path, '**/*.pgn')]
  end

  def self.pick_pgn(path, prefix = PGN_COLLECTION)
    file = File.join(prefix, path)
    return Chess::Pgn.new(file)
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
chess-0.4.0 test/test_helper.rb
chess-0.3.6 test/test_helper.rb
chess-0.3.5 test/test_helper.rb