Sha256: 2c72eb0d79b3b497d0ebb702dca1c1c675583aa4104a2d15c36cabf0f65080bf

Contents?: true

Size: 498 Bytes

Versions: 3

Compression:

Stored size: 498 Bytes

Contents

require 'spec_helper'

describe Gocoin::API do
	
	describe "'request' method" do

		it "should raise an error if route is not passed as parameter" do
			@gocoin_client = Gocoin::Client.new
			expect{@gocoin_client.api.request}.to raise_error ArgumentError
		end

		it "should raise an error if token is undefined" do
			@gocoin_client = Gocoin::Client.new
			expect{@gocoin_client.api.request '/somewhere'}.to raise_error 'Gocoin::API#request: API not ready. Token was not defined'
		end

	end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gocoin-0.1.4 spec/gocoin/api_spec.rb
gocoin-0.1.3 spec/gocoin/api_spec.rb
gocoin-0.1.2 spec/gocoin/api_spec.rb