tracks/ruby/lib/dominoes_cases.rb in trackler-2.1.0.1 vs tracks/ruby/lib/dominoes_cases.rb in trackler-2.1.0.2

- old
+ new

@@ -1,9 +1,9 @@ require 'exercise_cases' -class DominoesCase < OpenStruct - def test_name +class DominoesCase < ExerciseCase + def name 'test_%s' % description.gsub("can't", 'can not').gsub(/[= -]+/, '_') end def workload <<-WL.chomp @@ -11,15 +11,6 @@ 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