Sha256: a7dc087859b3021a775219aeb4a8646632c2e533d8edac03c0f89b9ec5a18bf7
Contents?: true
Size: 1.24 KB
Versions: 3
Compression:
Stored size: 1.24 KB
Contents
require 'test/unit' require 'external/test_support' IWATestSupport.set_src_dir require 'rbconfig' require 'net/http' class TC_AppConfig < Test::Unit::TestCase @@testdir = IWATestSupport.test_dir(__FILE__) def setup Dir.chdir(@@testdir) IWATestSupport.announce(:appconfig,"Iowa App Configuration") ruby = File.join(::Config::CONFIG['bindir'],::Config::CONFIG['ruby_install_name']) ruby << ::Config::CONFIG['EXEEXT'] assert_nothing_raised("setup failed") do @iowa_pid = IWATestSupport::create_process(:dir => 'TC_AppConfig/iowa', :cmd => [ruby,'-I../../../src','app.rb']) sleep 1 end end def teardown Process.kill "SIGKILL",@iowa_pid Process.wait @iowa_pid sleep 1 end def get_url(hostname,port,url) Net::HTTP.start(hostname,port) {|http| http.get(url)} end def testGetConfig assert_nothing_raised("Error trying to send request to iowa app via CGI adaptor.") do response = get_url('127.0.0.1','47990','/cgi/iowa.cgi') puts response.body assert(response.body =~ /"maxsize"=>200/, "The response returned from the iowa app has a malformed sessioncache entry.") assert(response.body =~ /Policy: Iowa::Policy/, "The response returned indicates that the Policy setting was not handled correctly.") end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
IOWA-1.0.3 | test/TC_AppConfig.rb |
IOWA-1.0.2 | test/TC_AppConfig.rb |
IOWA-1.0.0 | test/TC_AppConfig.rb |