Sha256: 9166fb965e0bb3a554eed708d8d083c245325e1f3a74740b48dd17db013df1e1

Contents?: true

Size: 710 Bytes

Versions: 1

Compression:

Stored size: 710 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe NSYapi do
  context 'Configuration' do
    it 'should be configurable with a block' do
      NSYapi.configure do |config|
        config.username = 'some-username'
        config.password = 'some-password'
      end
      expect(NSYapi.configuration.username).to eq('some-username')
      expect(NSYapi.configuration.password).to eq('some-password')
    end
  end

  context 'Singleton' do
    it 'should create a singleton' do
      NSYapi.configure do |config|
        config.username = 'some-username'
        config.password = 'some-password'
      end

      client = NSYapi.client
      expect(client).to eq(NSYapi.client)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ns-yapi-0.6.0 spec/nsyapi_spec.rb