Sha256: 706a20984114ff3e88215ab2893b5fb4f3a9c7c042f6a140799c689a44652f2b
Contents?: true
Size: 581 Bytes
Versions: 3
Compression:
Stored size: 581 Bytes
Contents
require 'cgi' describe "CGI::QueryExtension#content_length" do before(:each) do ENV['REQUEST_METHOD'], @old_request_method = "GET", ENV['REQUEST_METHOD'] @cgi = CGI.new end after(:each) do ENV['REQUEST_METHOD'] = @old_request_method end it "returns ENV['CONTENT_LENGTH'] as Integer" do old_value = ENV['CONTENT_LENGTH'] begin ENV['CONTENT_LENGTH'] = nil @cgi.content_length.should be_nil ENV['CONTENT_LENGTH'] = "100" @cgi.content_length.should eql(100) ensure ENV['CONTENT_LENGTH'] = old_value end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rubysl-cgi-1.0.0 | spec/queryextension/content_length_spec.rb |
rubysl-cgi-2.0.1 | spec/queryextension/content_length_spec.rb |
rubysl-cgi-2.0.0 | spec/queryextension/content_length_spec.rb |