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.5.10 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.9 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.8 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.7 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.6 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.5 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.4 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.3 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.2 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.1 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.5.0 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.4.0 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.9 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.8 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.7 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.6 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.5 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.4 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.3 tracks/ruby/lib/word_count_cases.rb
trackler-2.0.3.2 tracks/ruby/lib/word_count_cases.rb