Sha256: 2f62eafa17efc53dee4596a88c5ec61110483a81cc61ea63ff2b8321e20c0fbe

Contents?: true

Size: 670 Bytes

Versions: 8

Compression:

Stored size: 670 Bytes

Contents

require "rspec"
require File.expand_path(File.dirname(__FILE__) + '/../../lib/testingbot/config.rb')
require File.expand_path(File.dirname(__FILE__) + '/../../lib/testingbot/api.rb')

describe TestingBot::Api do
  describe "load config" do
  	it "should load the configuration in the constructor" do
  		api = TestingBot::Api.new
      api.instance_variable_get("@config").should_not be_nil
  	end

    it "should use the credentials passed in from the constructor, overwriting possible credentials from the config" do
      api = TestingBot::Api.new({ :client_key => "fake" })
      api.instance_variable_get("@config")[:client_key].should eql("fake")
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
testingbot-0.1.7 spec/unit/api_spec.rb
testingbot-0.1.6 spec/unit/api_spec.rb
testingbot-0.1.5 spec/unit/api_spec.rb
testingbot-0.1.4 spec/unit/api_spec.rb
testingbot-0.1.3 spec/unit/api_spec.rb
testingbot-0.1.2 spec/unit/api_spec.rb
testingbot-0.1.1 spec/unit/api_spec.rb
testingbot-0.1.0 spec/unit/api_spec.rb