Sha256: 4b284527d88413edd75d3832c6e199af5d6ecba18ddb440855b645d96ab9b30c

Contents?: true

Size: 513 Bytes

Versions: 6

Compression:

Stored size: 513 Bytes

Contents

require 'test_helper'

class CleverConfigurationTest < Test::Unit::TestCase

  should "set the api key" do
    Clever.configure do |config|
      config.api_key = "DEMO_KEY"
    end
    assert_equal("DEMO_KEY", Clever.api_key)
  end

  should "raise an error if no api key is set" do
    lambda {
      Clever.request(stub, stub)
    }.must_raise Clever::AuthenticationError
  end

  should "set a default for the api base" do
    Clever.configuration.api_base.must_equal('https://api.getclever.com/')
  end

end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
clever-ruby-0.2.0 test/unit/configuration_test.rb
clever-ruby-0.1.0 test/unit/configuration_test.rb
clever-ruby-0.0.5 test/unit/configuration_test.rb
clever-ruby-0.0.4 test/unit/configuration_test.rb
clever-ruby-0.0.3 test/unit/configuration_test.rb
clever-ruby-0.0.2 test/unit/configuration_test.rb