Sha256: bdd457bebc48a06ae587418f9c54e14f2d8cf87f17928425c1ec3d8a6da2940c

Contents?: true

Size: 685 Bytes

Versions: 52

Compression:

Stored size: 685 Bytes

Contents

describe :net_httpheader_set_content_type, :shared => true do
  describe "when passed type, params" do
    before(:each) do
      @headers = NetHTTPHeaderSpecs::Example.new
    end

    it "sets the 'Content-Type' header entry based on the passed type and params" do
      @headers.send(@method, "text/html")
      @headers["Content-Type"].should == "text/html"

      @headers.send(@method, "text/html", "charset" => "utf-8")
      @headers["Content-Type"].should == "text/html; charset=utf-8"

      @headers.send(@method, "text/html", "charset" => "utf-8", "rubyspec" => "rocks")
      @headers["Content-Type"].should == "text/html; charset=utf-8; rubyspec=rocks"
    end
  end
end

Version data entries

52 entries across 52 versions & 2 rubygems

Version Path
rhodes-7.6.0 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-7.5.1 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-7.4.1 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-7.1.17 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-6.2.0 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-6.0.11 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.18 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.17 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.15 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.0.22 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.2 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.0.7 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.0.3 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-5.5.0 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
tauplatform-1.0.3 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
tauplatform-1.0.2 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
tauplatform-1.0.1 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-3.5.1.12 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-3.3.5 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb
rhodes-3.4.2 spec/framework_spec/app/spec/library/net/http/httpheader/shared/set_content_type.rb