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.8.27 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.26 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.24 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.23 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.22 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.21 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.20 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.19 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.18 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.17 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.16 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.15 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.14 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.13 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.12 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.11 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.10 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.9 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.8 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb
trackler-2.0.8.7 tracks/ruby/test/fixtures/xruby/lib/alpha_cases.rb