(path, url, expected)
| 224 | |
| 225 | describe('.generateRegex()', function() { |
| 226 | function example(path, url, expected) { |
| 227 | var regex = Router.prototype.generateRegex(path) |
| 228 | , result = url.match(regex); |
| 229 | |
| 230 | if (expected) { |
| 231 | expect(result).to.be.ok; |
| 232 | } else { |
| 233 | expect(result).to.not.be.ok; |
| 234 | } |
| 235 | } |
| 236 | |
| 237 | it('should properly match the url', function() { |
| 238 | // should pass |