Sha256: f057a2c8a3946d68d34b8341f31199930b162878c42b30891ff8e3dc38980fd8

Contents?: true

Size: 720 Bytes

Versions: 2

Compression:

Stored size: 720 Bytes

Contents

require 'mida/datatype'
require 'yaml'

describe Mida::DataType::URL do

  it '#parse should raise an exception if a bad url passed' do
    test = lambda {Mida::DataType::URL.parse('example.com')}
    test.should raise_error(ArgumentError)
  end

  it '#parse should raise an exception if value is empty' do
    test = lambda {Mida::DataType::URL.parse('')}
    test.should raise_error(ArgumentError)
  end

  it '#parse should accept a valid url' do
    url_text = 'http://example.com/test/'
    url = Mida::DataType::URL.parse(url_text)
    url.to_s.should == url_text
  end


  it '#parse should accept a valid url' do
    url_text = 'http://example.com/test/'
    url = Mida::DataType::URL.parse(url_text)
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mida-0.3.6 spec/datatype/url_spec.rb
mida-0.3.3 spec/datatype/url_spec.rb