Honk! Test Net! ============= Some tools to help test browser-based network-y things in a headless environment.
Some tools to help test browser-based network-y things in a headless environmentment.
The underlying mock-thing-out-er-ator is based on Philipp von Weitershausen's mock_server.js impl. Seems to work well.
In a mocha or Jasmine environment, including this file will give you a @server properly set up and torn down around all your tests.
Usage is as so:
require 'honk-test-net/http_server'describe 'Remote Pants Service'->it 'should give me info on pants'@serverwhen 'GET''/pants'status: 200body: 'Pants Found'$get '/':expectrespdatatoequal 'Pants Found'done