Sha256: e61eaf93d05f2f3b373a8c8a07c07dee51bd293b967edb6a54a221fdaf81dec4

Contents?: true

Size: 1.84 KB

Versions: 1

Compression:

Stored size: 1.84 KB

Contents

require 'simplecov'
SimpleCov.start

require 'minitest/spec'
require 'minitest/mock'

require 'mocha/setup'

begin
  require 'turn/autorun'

  Turn.config do |c|
    # use one of output formats:
    # :outline  - turn's original case/test outline mode [default]
    # :progress - indicates progress with progress bar
    # :dotted   - test/unit's traditional dot-progress mode
    # :pretty   - new pretty reporter
    # :marshal  - dump output as YAML (normal run mode only)
    # :cue      - interactive testing
    c.format  = :dotted
    # use humanized test names (works only with :outline format)
    c.natural = true
  end

  require 'awesome_print'
  module Minitest::Assertions
    def mu_pp(obj)
      obj.awesome_inspect
    end
  end

  require 'pry-rescue/minitest'
rescue LoadError
end

# Match log information in dealer_logs
class MatchLog
  DEALER_LOG_DIRECTORY = File.expand_path('../dealer_logs', __FILE__)

  attr_reader :results_file_name, :actions_file_name, :player_names, :dealer_log_directory

  def initialize(results_file_name, actions_file_name, player_names)
    @results_file_name = results_file_name
    @actions_file_name = actions_file_name
    @player_names = player_names
  end

  def actions_file_path
    "#{DEALER_LOG_DIRECTORY}/#{@actions_file_name}"
  end

  def results_file_path
    "#{DEALER_LOG_DIRECTORY}/#{@results_file_name}"
  end
end

def match_logs
  [
    MatchLog.new(
      '2p.limit.h1000.r0.log',
      '2p.limit.h1000.r0.actions.log',
      ['p1', 'p2']
    ),
    MatchLog.new(
      '2p.nolimit.h1000.r0.log',
      '2p.nolimit.h1000.r0.actions.log',
      ['p1', 'p2']
    ),
    MatchLog.new(
      '3p.limit.h1000.r0.log',
      '3p.limit.h1000.r0.actions.log',
      ['p1', 'p2', 'p3']
    ),
    MatchLog.new(
      '3p.nolimit.h1000.r0.log',
      '3p.nolimit.h1000.r0.actions.log',
      ['p1', 'p2', 'p3']
    )
  ]
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acpc_poker_basic_proxy-2.0.0 spec/support/spec_helper.rb