Class: CGIEmu
Overview
little fake cgi class that allows automated testing of cgi application
Defined Under Namespace
Classes: EnvTable
Instance Attribute Summary collapse
-
#out_content ⇒ Object
readonly
Returns the value of attribute out_content.
-
#out_params ⇒ Object
readonly
Returns the value of attribute out_params.
Instance Method Summary collapse
- #env_table ⇒ Object
-
#initialize(options) ⇒ CGIEmu
constructor
A new instance of CGIEmu.
- #out(params, &block) ⇒ Object
- #stdinput ⇒ Object
Methods inherited from CGI
#cgidump, fix_env, #parameters, #query_parameters, #request_parameters
Constructor Details
#initialize(options) ⇒ CGIEmu
Returns a new instance of CGIEmu.
65 66 67 68 |
# File 'lib/cuca/cgi_emu.rb', line 65 def initialize() @test_options = super() end |
Instance Attribute Details
#out_content ⇒ Object (readonly)
Returns the value of attribute out_content.
6 7 8 |
# File 'lib/cuca/cgi_emu.rb', line 6 def out_content @out_content end |
#out_params ⇒ Object (readonly)
Returns the value of attribute out_params.
5 6 7 |
# File 'lib/cuca/cgi_emu.rb', line 5 def out_params @out_params end |
Instance Method Details
#env_table ⇒ Object
56 57 58 |
# File 'lib/cuca/cgi_emu.rb', line 56 def env_table EnvTable.new(@test_options) end |
#out(params, &block) ⇒ Object
70 71 72 73 |
# File 'lib/cuca/cgi_emu.rb', line 70 def out(params, &block) @out_params = params @out_content = block.call end |
#stdinput ⇒ Object
60 61 62 63 |
# File 'lib/cuca/cgi_emu.rb', line 60 def stdinput # $stderr.puts "Returning STDINPUT" StringIO.new("") end |