@@ -57,7 +57,7 @@ def test_tag_maker_functionality
5757 'html4Fr' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">' ,
5858 'html5' => '<!DOCTYPE HTML>'
5959 }
60-
60+
6161 html_versions . each do |version , expected_doctype |
6262 cgi = CGI . new ( tag_maker : version )
6363 assert_respond_to ( cgi , :doctype , "HTML generation methods should be loaded for #{ version } " )
@@ -80,11 +80,11 @@ def test_string_tag_maker_equivalent
8080
8181 cgi1 = CGI . new ( 'html5' )
8282 cgi2 = CGI . new ( tag_maker : 'html5' )
83-
83+
8484 # Both should have HTML generation methods loaded
8585 assert_respond_to ( cgi1 , :doctype )
8686 assert_respond_to ( cgi2 , :doctype )
87-
87+
8888 # Both should produce the same doctype
8989 assert_equal ( cgi1 . doctype , cgi2 . doctype )
9090 assert_equal ( '<!DOCTYPE HTML>' , cgi1 . doctype )
@@ -96,13 +96,13 @@ def test_offline_mode
9696 ENV . delete ( 'QUERY_STRING' )
9797 ENV . delete ( 'SERVER_SOFTWARE' )
9898 ENV . delete ( 'SERVER_PROTOCOL' )
99-
99+
100100 # Create test input
101101 test_input = "name=value&test=123"
102102 $stdin = StringIO . new ( test_input )
103-
103+
104104 cgi = CGI . new
105-
105+
106106 # In offline mode, it should read from stdin
107107 assert_equal ( "value" , cgi [ 'name' ] )
108108 assert_equal ( "123" , cgi [ 'test' ] )
@@ -145,7 +145,7 @@ def test_object_structure
145145 )
146146
147147 cgi = CGI . new
148-
148+
149149 # Test documented instance variables and methods exist
150150 assert_kind_of ( Hash , cgi . cookies )
151151 assert_kind_of ( Hash , cgi . params )
@@ -182,7 +182,7 @@ def test_encoding_error_block_handling
182182 'REQUEST_METHOD' => 'POST' ,
183183 'CONTENT_TYPE' => 'application/x-www-form-urlencoded' ,
184184 'CONTENT_LENGTH' => test_input . length . to_s ,
185- 'SERVER_SOFTWARE' => 'Apache 2.2.0' ,
185+ 'SERVER_SOFTWARE' => 'Apache 2.2.0' ,
186186 'SERVER_PROTOCOL' => 'HTTP/1.1' ,
187187 )
188188
@@ -208,7 +208,7 @@ def test_class_vs_instance_charset
208208
209209 # Class default should be UTF-8
210210 assert_equal ( Encoding ::UTF_8 , CGI . accept_charset )
211-
211+
212212 # Instance with no option should use class default internally
213213 cgi = CGI . new
214214 assert_equal ( Encoding ::UTF_8 , cgi . instance_variable_get ( :@accept_charset ) )
@@ -257,10 +257,10 @@ def test_option_assignment
257257 assert_equal ( 'EUC-JP' , cgi1 . instance_variable_get ( :@accept_charset ) )
258258 assert_equal ( 512 * 1024 , cgi2 . instance_variable_get ( :@max_multipart_length ) )
259259 assert_respond_to ( cgi3 , :doctype )
260-
260+
261261 assert_equal ( 'ISO-8859-1' , cgi4 . instance_variable_get ( :@accept_charset ) )
262262 assert_equal ( 256 * 1024 , cgi4 . instance_variable_get ( :@max_multipart_length ) )
263263 assert_respond_to ( cgi4 , :doctype )
264264 assert_equal ( '<!DOCTYPE HTML>' , cgi4 . doctype )
265265 end
266- end
266+ end
0 commit comments