Sha256: c0be379ec92adb2cb3f2893c2c681c2eb0cdbc5bc1d79ba5e6d78c2d42e18cfe

Contents?: true

Size: 620 Bytes

Versions: 3

Compression:

Stored size: 620 Bytes

Contents

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

require 'chess'
require 'minitest/autorun'
require 'byebug'

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.3.4 test/test_helper.rb
chess-0.3.3 test/test_helper.rb
chess-0.3.2 test/test_helper.rb