diff options
Diffstat (limited to 'spec/ruby/library/cgi/shared/http_header.rb')
| -rw-r--r-- | spec/ruby/library/cgi/shared/http_header.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/spec/ruby/library/cgi/shared/http_header.rb b/spec/ruby/library/cgi/shared/http_header.rb index ed65b20abd..e739fed538 100644 --- a/spec/ruby/library/cgi/shared/http_header.rb +++ b/spec/ruby/library/cgi/shared/http_header.rb @@ -1,4 +1,4 @@ -require File.expand_path('../../../../spec_helper', __FILE__) +require_relative '../../../spec_helper' require 'cgi' describe :cgi_http_header, shared: true do @@ -13,7 +13,7 @@ describe :cgi_http_header, shared: true do end - it "returns a HTTP header specifiying the Content-Type as text/html" do + it "returns a HTTP header specifying the Content-Type as text/html" do @cgi.send(@method).should == "Content-Type: text/html\r\n\r\n" end @@ -34,7 +34,7 @@ describe :cgi_http_header, shared: true do end - it "returns a HTTP header specifiying the Content-Type as the passed String's content" do + it "returns a HTTP header specifying the Content-Type as the passed String's content" do @cgi.send(@method, "text/plain").should == "Content-Type: text/plain\r\n\r\n" end @@ -63,11 +63,11 @@ describe :cgi_http_header, shared: true do header.should == "Content-Type: text/plain; charset=UTF-8\r\n\r\n" header = @cgi.send(@method, "nph" => true) - header.should include("HTTP/1.0 200 OK\r\n") - header.should include("Date: ") - header.should include("Server: ") - header.should include("Connection: close\r\n") - header.should include("Content-Type: text/html\r\n") + header.should.include?("HTTP/1.0 200 OK\r\n") + header.should.include?("Date: ") + header.should.include?("Server: ") + header.should.include?("Connection: close\r\n") + header.should.include?("Content-Type: text/html\r\n") header = @cgi.send(@method, "status" => "OK") header.should == "Status: 200 OK\r\nContent-Type: text/html\r\n\r\n" @@ -105,7 +105,7 @@ describe :cgi_http_header, shared: true do @cgi.send(@method, {}).should == "Content-Type: text/html\r\nSet-Cookie: multiple\r\nSet-Cookie: cookies\r\n\r\n" end - it "returns a HTTP header specifiying the Content-Type as text/html when passed an empty Hash" do + it "returns a HTTP header specifying the Content-Type as text/html when passed an empty Hash" do @cgi.send(@method, {}).should == "Content-Type: text/html\r\n\r\n" end end |
