Sha256: fc59aef2ff6e0e29348251c97c5e6c19298381764dff8671128a8b603ab593b7

Contents?: true

Size: 471 Bytes

Versions: 3

Compression:

Stored size: 471 Bytes

Contents

require 'cgi'

describe "CGI::QueryExtension#pragma" 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['HTTP_PRAGMA']" do
    old_value, ENV['HTTP_PRAGMA'] = ENV['HTTP_PRAGMA'], "no-cache"
    begin
      @cgi.pragma.should == "no-cache"
    ensure
      ENV['HTTP_PRAGMA'] = old_value
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rubysl-cgi-1.0.0 spec/queryextension/pragma_spec.rb
rubysl-cgi-2.0.1 spec/queryextension/pragma_spec.rb
rubysl-cgi-2.0.0 spec/queryextension/pragma_spec.rb