Sha256: 4ec5638ab55803449cefd1aca840ab3422ba6de2425bbf4b8a4302dce4ceed7a

Contents?: true

Size: 621 Bytes

Versions: 5

Compression:

Stored size: 621 Bytes

Contents

require 'spec_helper'

describe "OandaAPI::Client::NamespaceProxy" do
  let(:client) { OandaAPI::Client::UsernameClient.new("spongebob") }
  let(:namespace_proxy) { OandaAPI::Client::NamespaceProxy.new client, "account" }

  describe "#initialize" do
    it "raises ArgumentError unless an OandaAPI::Client is passed" do
      expect { OandaAPI::Client::NamespaceProxy.new nil, "account" }.to raise_error(ArgumentError)
    end

    it "raises ArgumentError unless a non-empty namespace string is passed" do
      expect { OandaAPI::Client::NamespaceProxy.new client, "" }.to raise_error(ArgumentError)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
oanda_api-0.9.4 spec/oanda_api/client/namespace_proxy_spec.rb
oanda_api-0.9.3 spec/oanda_api/client/namespace_proxy_spec.rb
oanda_api-0.9.2 spec/oanda_api/client/namespace_proxy_spec.rb
oanda_api-0.9.0 spec/oanda_api/client/namespace_proxy_spec.rb
oanda_api-0.8.3 spec/oanda_api/client/namespace_proxy_spec.rb