Sha256: 720072b649602a3bbe0fc607b0a84f9c35dc2e8fedc0f1e527aaa6d17c5108d6

Contents?: true

Size: 479 Bytes

Versions: 6

Compression:

Stored size: 479 Bytes

Contents

require 'spec_helper'
require 'parameters/types/uri'

describe Parameters::Types::URI do
  subject { described_class }

  let(:url) { 'http://www.example.com/' }
  let(:uri) { URI.parse(url)            }

  describe "===" do
    it "should check if the value is kind of URI::Generic" do
      subject.should_not === URI

      subject.should === uri
    end
  end

  describe "coerce" do
    it "should parse Strings" do
      subject.coerce(url).should == uri
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
parameters-0.4.4 spec/types/uri_spec.rb
parameters-0.4.3 spec/types/uri_spec.rb
parameters-0.4.2 spec/types/uri_spec.rb
parameters-0.4.0 spec/types/uri_spec.rb
parameters-0.3.1 spec/types/uri_spec.rb
parameters-0.3.0 spec/types/uri_spec.rb