Sha256: ece03e6450495793a21c22c9ebbd32e633fcd6ecd13995343db4ecb12607655d

Contents?: true

Size: 355 Bytes

Versions: 9

Compression:

Stored size: 355 Bytes

Contents

#= require spec_helper
#= require modularity/tools/array_tools

describe 'array_tools', ->

  describe 'array_unique', ->

    it 'removes duplicate entries from the given array', ->
      modularity.array_unique([1,1,2,2,3]).should.eql [1,2,3]

    it 'works with unsorted arrays', ->
      modularity.array_unique([2,3,1,2,1]).sort().should.eql [1,2,3]

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
modularity-rails-0.15.0 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.14.0 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.12.3 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.12.2 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.12.1 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.12.0 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.11.1 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.11.0 demo/spec/javascripts/tools/array_tools_spec.coffee
modularity-rails-0.10.0 demo/spec/javascripts/tools/array_tools_spec.coffee