diff options
author | Eric Wong <normalperson@yhbt.net> | 2010-06-10 18:22:25 -0700 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2010-06-10 18:28:21 -0700 |
commit | cf47d3e51d7b0aecdda8b0f27631161977900a47 (patch) | |
tree | a549cbb1b90e4e5ba2bda39345598156e756e9aa /t | |
parent | b73218100032ead24360d33361fefa914074f30a (diff) | |
download | rainbows-cf47d3e51d7b0aecdda8b0f27631161977900a47.tar.gz |
Some folks can now show off their Rainbows! installation
Diffstat (limited to 't')
-rwxr-xr-x | t/t9002-server-token.sh | 37 | ||||
-rw-r--r-- | t/t9002.ru | 4 |
2 files changed, 41 insertions, 0 deletions
diff --git a/t/t9002-server-token.sh b/t/t9002-server-token.sh new file mode 100755 index 0000000..914a717 --- /dev/null +++ b/t/t9002-server-token.sh @@ -0,0 +1,37 @@ +#!/bin/sh +. ./test-lib.sh +case $model in +Base) ;; +*) exit 0 ;; # don't waste cycles on trivial stuff :P +esac + +t_plan 6 "ServerToken Rack middleware test for $model" + +t_begin "configure and start" && { + rtmpfiles curl_out curl_err + rainbows_setup + rainbows -D t9002.ru -c $unicorn_config + rainbows_wait_start +} + +t_begin "hit with curl" && { + curl -sSfiI http://$listen/ > $curl_out 2> $curl_err +} + +t_begin "kill server" && { + kill $rainbows_pid +} + +t_begin "no errors in curl stderr" && { + test ! -s $curl_err +} + +t_begin "no errors in Rainbows! stderr" && { + check_stderr +} + +t_begin "Server: token added" && { + grep Server: $curl_out +} + +t_done diff --git a/t/t9002.ru b/t/t9002.ru new file mode 100644 index 0000000..7f55824 --- /dev/null +++ b/t/t9002.ru @@ -0,0 +1,4 @@ +require 'rainbows/server_token' +require 'rack/lobster' +use Rainbows::ServerToken +run Rack::Lobster.new |