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

- old
+ new

@@ -1,16 +1,9 @@ require 'exercise_cases' -class TransposeCase < OpenStruct - def test_name - "test_#{description.tr(' ', '_')}" - end +class TransposeCase < ExerciseCase - def skipped - index.zero? ? '# skip' : 'skip' - end - def workload 'Transpose.transpose(input)' end def expect @@ -35,13 +28,7 @@ lines.map { |line| indent_line(line, indent) }.join("\n") end def indent_line(line, indent = 2) ' ' * indent * 2 + line - end -end - -TransposeCases = proc do |data| - JSON.parse(data)['cases'].map.with_index do |row, i| - TransposeCase.new(row.merge('index' => i)) end end