Sha256: 10facbaf0696d7be19a9d22078b46481845e370ce266da632ec5d3a4c5e51f49

Contents?: true

Size: 530 Bytes

Versions: 4

Compression:

Stored size: 530 Bytes

Contents

require 'test_helper'

class CligsTest < Test::Unit::TestCase
  context "A cli.gs instance" do
    setup do
      FakeWeb.register_uri(:get, "http://cli.gs/api/v1/cligs/create?url=http%3A%2F%2Fgoogle.com", :body => File.join(File.dirname(__FILE__), 'fixtures', 'cligs-shorten-google.txt'))
      @cligs = Shorty::Cligs.new
    end
    
    should "exist" do
      assert @cligs
    end    
    
    should "return a shortened url" do
      assert_equal 'http://cli.gs/g5nmE', @cligs.shorten('http://google.com')
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
drcapulet-shorty-0.1.0 test/cligs_test.rb
drcapulet-shorty-0.1.1 test/cligs_test.rb
shorty-0.1.2 test/cligs_test.rb
shorty-0.1.1 test/cligs_test.rb