Merge branch 'master' of git://github.com/visionmedia/express
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by ciaranj · committed by ciaranj · parents 6f7141a, 080e429 · Browse files · 8 files·+25 added−16 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
8 files+25 added−16 removed
- tests:+14 added−7 removed
- other:+11 added−9 removed
Provenance
- Commit
3f9cbbb- Tree
4cce203- Author
ciaranj <ciaranj@gmail.com>- Committer
ciaranj <ciaranj@gmail.com>- Parent 1
6f7141a- Parent 2
080e429
8 files changed+25 added−16 removed
modified:spec/lib/jspec.js+1 added-1 removed
2 unmodified lines3 4 ;(function(){5 6 JSpec = {7- version : '3.0.0',7+ version : '3.1.0',8 assert : true,9 cache : {},10 suites : [],11 modules : [],1762 unmodified linesmodified:spec/spec.collection.js+2 added-2 removed
269 unmodified lines270 end271 272 describe '#keys()'273 it 'should return indices when array-like'274- $(['foo', 'bar']).keys().at(0).should.eql 0275- $(['foo', 'bar']).keys().at(1).should.eql 1274+ $(['foo', 'bar']).keys().at(0).should.eql '0'275+ $(['foo', 'bar']).keys().at(1).should.eql '1'276 end277 278 it 'should return keys when an object'279 $({ foo: 'bar', baz: 'raz' }).keys().at(0).should.eql 'foo'193 unmodified linesmodified:spec/spec.request.js+1 added-2 removed
85 unmodified lines86878889909091929293949578 unmodified lines85 unmodified lines end
describe 'when given an invalid status code' it 'should throw an InvalidStatusCode exception' // TODO: throw_error(InvalidStatusCode, ...) when jspec is fixed // TODO: use throw_error when fixed... get('/user', function(){ this.halt(123123) }) -{ get('/user') }.should.throw_error(/InvalidStatusCode: 123123 is an invalid HTTP response code/) try { get('/user') } catch (e) { e.should.be_an_instance_of ExpressError e.should.be_an_instance_of InvalidStatusCode78 unmodified linesmodified:spec/spec.routing.js+5 added-1 removed
84 unmodified lines85 end86 87 describe 'with no response body'88 it 'should throw a InvalidResponseBody'89+ // TODO: use throw_error when fixed...90 get('/user', function(){91 this.respond()92 })92- -{ get('/user') }.should.throw_error(/InvalidResponseBody: get "\/user" did not respond with a body string/)93+ try { get('/user') }94+ catch (e) {95+ e.should.be_an_instance_of InvalidResponseBody96+ }97 end98 end99 100 describe 'with regular expression'221 unmodified linesmodified:spec/spec.static.js+5 added-1 removed
9 unmodified lines10111213141415161718192021229 unmodified lines (new StaticFile('/foo/bar')).path.should.eql '/foo/bar' end it 'should throw an InvalidPathError when .. is found' -{ new StaticFile('/../foobar') }.should.throw_error(/InvalidPathError/) // TODO: use throw_error when fixed... try { new StaticFile('/../foobar') } catch (e) { e.should.be_an_instance_of InvalidPathError } end end endendNo newline at end of fileNo newline at end of filemodified:.gitmodules+3 added-3 removed
1-[submodule "support/haml"]2- path = support/haml3- url = git://github.com/creationix/haml-js.git1+[submodule "spec/support/libxmljs"]2+ path = spec/support/libxmljs3+ url = git://github.com/sprsquish/libxmljs.git4 [submodule "lib/support/haml"]5 path = lib/support/haml6 url = git://github.com/creationix/haml-js.git7 [submodule "lib/support/js-oo"]2 unmodified linesmodified:Makefile+5 added-2 removed
1 2 NODE = node3 4+init: lib/support/js-oo/Readme.md5+ @git submodule update --init6+4-test: spec/support/libxmljs/libxmljs.node7+test: init spec/support/libxmljs/libxmljs.node8 @$(NODE) spec/node.js9 10 app:11 @$(NODE) examples/app.js3 unmodified lines15 16 spec/support/libxmljs/libxmljs.node:17 @scons -C spec/support/libxmljs libxmljs.node18 16-.PHONY: test benchmark app19+.PHONY: init test benchmark appmodified:Readme.md+3 added-4 removed
80 unmodified lines81 Express uses the [JSpec](http://jspec.info) BDD JavaScript testing82 framework to write and run elegant spec suites. JSpec is froozen 83 to spec/lib and does not require seperate installation.84 85-To run all specifications:85+To run all specifications run the following command. This will ensure86+git submodules are initialized and updated, as well as building test87+related dependencies such as libxmljs.88 89 $ make test90 91 Run individual suites:2 unmodified lines94 $ node spec/node.js mime95 $ node spec/node.js routing96 ...97 96-Runnning libxmljs related specs, if you have an architecture issue97-then you will need to rebuild _spec/support/libxmljs.node_.98-98 Express is currently being developed with node --version:99 v0.1.21-66-g59a78d6100 101 ## More Information34 unmodified lines