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.0.6.31 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.30 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.29 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.28 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.27 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.26 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.25 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.24 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.23 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.22 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.21 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.20 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.19 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.18 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.17 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.16 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.15 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.14 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.13 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.6.12 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb