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

Version Path
trackler-2.1.0.11 tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_cases.rb
trackler-2.1.0.10 tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_cases.rb
trackler-2.1.0.9 tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_cases.rb
trackler-2.1.0.8 tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_cases.rb
trackler-2.1.0.7 tracks/ruby/test/fixtures/xruby/exercises/alpha/.meta/generator/alpha_cases.rb
trackler-2.1.0.6 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.5 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.4 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.3 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.2 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.1 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.1.0.0 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.55 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.54 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.53 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.52 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.51 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.50 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.49 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.48 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb