spectacular
Version:
Advanced BDD framework for CoffeeScript and JavaScript
13 lines (9 loc) • 437 B
text/coffeescript
if typeof module is 'undefined'
describe spectacular.URLParameters, ->
context 'when created with a query string', ->
given 'params', ->
'foo=true&bar[]=1&bar[]=2&bar[2][foo]=bar&baz[foo]=bar&bar[2][baz]=foo'
subject -> new spectacular.URLParameters
its 'foo', -> should equal true
its 'bar', -> should equal [ 1, 2, {foo: 'bar', baz: 'foo'} ]
its 'baz', -> should equal foo: 'bar'