Sha256: 0f39e7c267ca5d5c99bfa5434073b6603c913b06e59c9ad7071e357b9fc8c23a

Contents?: true

Size: 855 Bytes

Versions: 2

Compression:

Stored size: 855 Bytes

Contents

require 'spec_helper'
require 'ronin/formatting/extensions/http/integer'

describe Integer do
  subject { 0x20 }

  it "should provide String#uri_encode" do
    should respond_to(:uri_encode)
  end

  it "should provide String#uri_escape" do
    should respond_to(:uri_escape)
  end

  it "should provide String#format_http" do
    should respond_to(:format_http)
  end

  describe "uri_encode" do
    let(:uri_encoded) { '%20' }

    it "should URI encode itself" do
      subject.uri_encode.should == uri_encoded
    end
  end

  describe "uri_escape" do
    let(:uri_escaped) { '+' }

    it "should URI escape itself" do
      subject.uri_escape.should == uri_escaped
    end
  end

  describe "format_http" do
    let(:http_formatted) { '%20' }

    it "should format the byte" do
      subject.format_http.should == http_formatted
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ronin-support-0.1.0.pre2 spec/formatting/http/integer_spec.rb
ronin-support-0.1.0.pre1 spec/formatting/http/integer_spec.rb