Sha256: aee4917cc259cae9f84fb9bfa2732abc9231568dffc0c1e1e3ff76119a4b17e5

Contents?: true

Size: 554 Bytes

Versions: 17

Compression:

Stored size: 554 Bytes

Contents

JS.ENV.FayeSpec = JS.Test.describe("Faye", function() { with(this) {
  include(JS.Test.Helpers)
  
  describe("random", function() { with(this) {
    it("returns a 128-bit random number in base 36", function() { with(this) {
      assertMatch( /^[a-z0-9]+$/, Faye.random() )
    }})
    
    it("always produces the same length of string", function() { with(this) {
      var ids = $R(1,100).map(function() { return Faye.random().length })
      var expected = $R(1,100).map(function() { return 28 })
      assertEqual( expected, ids )
    }})
  }})
}})

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
faye-0.7.2 spec/javascript/faye_spec.js
faye-0.6.8 spec/javascript/faye_spec.js
_bushido-faye-0.8.2 spec/javascript/faye_spec.js
_bushido-faye-0.8.1 spec/javascript/faye_spec.js
bushido-faye-0.8.1 spec/javascript/faye_spec.js
faye-0.8.1 spec/javascript/faye_spec.js
faye-0.8.0 spec/javascript/faye_spec.js
faye-0.7.1 spec/javascript/faye_spec.js
faye-0.7.0 spec/javascript/faye_spec.js
faye-0.6.7 spec/javascript/faye_spec.js
faye-0.6.6 spec/javascript/faye_spec.js
faye-0.6.5 spec/javascript/faye_spec.js
faye-0.6.4 spec/javascript/faye_spec.js
faye-0.6.3 spec/javascript/faye_spec.js
faye-0.6.2 spec/javascript/faye_spec.js
faye-0.6.1 spec/javascript/faye_spec.js
faye-0.6.0 spec/javascript/faye_spec.js