Sha256: 258e0a9638696d23be7ac2f214606514cde55308fc58fa301578ad6d7c70591b

Contents?: true

Size: 764 Bytes

Versions: 6

Compression:

Stored size: 764 Bytes

Contents

require File.join(File.dirname(__FILE__), '..', 'test_helper.rb')

class TestConfig < Test::Unit::TestCase
  context "bitly module" do
    should "create a new bitly v3 client through initializer" do
      # configure
      Bitly.configure do |config|
        config.api_version = 3
        config.login = login
        config.api_key = api_key
        config.timeout = 10
      end
      b = Bitly.client
      assert_equal Bitly::V3::Client, b.class
    end

    should "create a new bitly v2 client through initializer" do
      # configure
      Bitly.configure do |config|
        config.api_version = 2
        config.login = login
        config.api_key = api_key
      end
      b = Bitly.client
      assert_equal Bitly::Client, b.class
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
bitly-0.10.4 test/bitly/test_config.rb
bitly-0.10.3 test/bitly/test_config.rb
bitly-0.10.2 test/bitly/test_config.rb
bitly-0.10.1 test/bitly/test_config.rb
bitly-0.10.0 test/bitly/test_config.rb
bitly-0.9.0 test/bitly/test_config.rb