Sha256: 1cb09b749adfa890169045de29d766c1cfb4b17047ba41bffa8a16708701b2be

Contents?: true

Size: 536 Bytes

Versions: 48

Compression:

Stored size: 536 Bytes

Contents

class DominoesCase < OpenStruct
  def test_name
    'test_%s' % description.gsub("can't", 'can not').gsub(/[= -]+/, '_')
  end

  def workload
    <<-WL.chomp
input_dominoes = #{input}
    output_chain = Dominoes.chain(input_dominoes)
    #{can_chain ? 'assert' : 'refute' }_correct_chain(input_dominoes, output_chain)
    WL
  end

  def skipped
    index.zero? ? '# skip' : 'skip'
  end
end

DominoesCases = proc do |data|
  JSON.parse(data)['cases'].map.with_index do |row, i|
    DominoesCase.new(row.merge('index' => i))
  end
end

Version data entries

48 entries across 48 versions & 1 rubygems

Version Path
trackler-2.0.6.11 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.10 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.9 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.8 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.7 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.6 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.5 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.4 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.3 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.2 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.1 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.6.0 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.18 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.17 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.16 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.15 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.14 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.13 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.12 tracks/ruby/lib/dominoes_cases.rb
trackler-2.0.5.11 tracks/ruby/lib/dominoes_cases.rb