Sha256: 3d451d19bdc7fb36099291e9b20028c53f93fa88a9bd464da3cd76d1a248e27d
Contents?: true
Size: 684 Bytes
Versions: 2
Compression:
Stored size: 684 Bytes
Contents
require File.expand_path(File.dirname(__FILE__) + '/spec_helper') describe "Corto" do let(:corto) {Corto.new({"db_name"=>'spec/data/test_db.db'})} it "should recreate a shortned url db" do corto.purge corto.count.should == 0 end it "should shrink an url" do a = corto.shrink('http://www.armoredcode.com') a.should.nil? == false end it "should able to reverse a shrink" do a = corto.shrink('http://www.armoredcode.com') b = corto.deflate(a) b.should == "http://www.armoredcode.com" end it "should handle a non existing shrink" do a = corto.deflate('this can not be a valid shrinked url') a.should.nil? == true end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
corto-0.99.0 | spec/corto_spec.rb |
corto-0.90.0 | spec/corto_spec.rb |