Skip to content

Instantly share code, notes, and snippets.

View millross's full-sized avatar

Jez Prime (Millross Consultants) millross

View GitHub Profile
### Keybase proof
I hereby claim:
* I am millross on github.
* I am jezprime (https://keybase.io/jezprime) on keybase.
* I have a public key ASD-LhyoAXE3N5_5gobBGLpIstmlepHnyt1m022FByoYHgo
To claim this, I am signing this object:
// Must be defined in each controller
exports.install = function(framework, name) {
// this place is for definition routes (HTTP, CUSTOM STATIC FILES, WEBSOCKETS)
// http://docs.totaljs.com/Framework/#framework.route
framework.route('/api/', api_root);
framework.route('/api/book/', new_book, ["json", "post"]);
}
@millross
millross / FailingIntegrationTest.groovy
Created August 1, 2013 20:39
Demo of groovy vert.x failure with rxJava, and success with minor change, both are intended to be run as groovy integration tests for vert.x. FailingIntegrationTest.groovy should fail, and SucceedingIntegrationTest.groovy should succeed thanks to the casting of the closure using the as keyword
import org.vertx.groovy.testtools.VertxTests
import rx.util.functions.Action0
import static org.vertx.testtools.VertxAssert.testComplete
// And import static the VertxTests script
// The test methods must being with "test"
def testTrivialRxJava() {
rx.Observable.from("one", "two", "three")
.take(2)