Sha256: 85448e89b1145f225e39946fec39e09e4d2e8e73ec05ef3c554f32b3c3ce8ea3

Contents?: true

Size: 349 Bytes

Versions: 58

Compression:

Stored size: 349 Bytes

Contents

class WordCountCase < OpenStruct
  def name
    'test_%s' % description.tr(' ', '_')
  end

  def object_under_test
    %Q(Phrase.new(#{input.inspect}))
  end

  def skipped?
    index.nonzero?
  end
end

WordCountCases = proc do |data|
  JSON.parse(data)['cases'].map.with_index do |row, i|
    WordCountCase.new(row.merge('index' => i))
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
trackler-2.0.6.11 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.10 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.9 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.8 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.7 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.6 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.5 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.4 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.3 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.2 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.1 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.6.0 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.18 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.17 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.16 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.15 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.14 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.13 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.12 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.11 tracks/ruby/lib/word_count_cases.rb