Sha256: e348e8f6d29221f199d57a48158d5eb0a1e76fa566c1c2abb4ed4b7b768a05c8
Contents?: true
Size: 362 Bytes
Versions: 100
Compression:
Stored size: 362 Bytes
Contents
class AlphaCase < OpenStruct def name format('test_%s', description.downcase.gsub(/[ -]/, '_')) end def assertion expected ? 'assert' : 'refute' end def skip index.zero? ? '# skip' : 'skip' end end AlphaCases = proc do |data| JSON.parse(data)['cases'].map.with_index do |row, i| AlphaCase.new(row.merge('index' => i)) end end
Version data entries
100 entries across 100 versions & 1 rubygems