Sha256: aed9996a077372f1a6bb91e71460ebbdbd970404176ba0e4c22cbffa27f095d2

Contents?: true

Size: 961 Bytes

Versions: 396

Compression:

Stored size: 961 Bytes

Contents

Words = require "./words"

describe "Words", ->
  it "counts one word", ->
    words = new Words "word"
    expect(words.count()).toEqual
      word: 1

  xit "counts one of each", ->
    words = new Words "one of each"
    expect(words.count()).toEqual
      one: 1
      of: 1
      each: 1

  xit "counts multiple occurrences", ->
    words = new Words "one fish two fish red fish blue fish"
    expect(words.count()).toEqual
      one: 1
      fish: 4
      two: 1
      red: 1
      blue: 1

  xit "ignores punctuation", ->
    words = new Words "car : carpet as java : javascript!!&@$%^&"
    expect(words.count()).toEqual
      car: 1
      carpet: 1
      as: 1
      java: 1
      javascript: 1

  xit "includes numbers", ->
    words = new Words "testing, 1, 2 testing"
    expect(words.count()).toEqual
      testing: 2
      1: 1
      2: 1

  xit "normalizes case", ->
    words = new Words "go Go GO"
    expect(words.count()).toEqual
      go: 3

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.179 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.178 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.177 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.176 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.175 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.174 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.173 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.172 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.171 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.170 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.169 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.167 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.166 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.165 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.164 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.163 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.162 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.161 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee
trackler-2.2.1.160 tracks/coffeescript/exercises/word-count/word-count_test.spec.coffee