Sha256: 8a5739464efa895229b97e9f677e1eeb081f13604c28f6875721480908032927

Contents?: true

Size: 705 Bytes

Versions: 3

Compression:

Stored size: 705 Bytes

Contents

require 'spec_helper'

describe Myfinance do
  it 'has a version number' do
    expect(Myfinance::VERSION).to_not be_nil
  end

  describe 'configuration' do
    it 'should be done via block initialization' do
      Myfinance.configure do |c|
        c.user_agent = "My App v1.0"
        c.url = "https://sandbox.myfinance.com.br"
      end

      expect(Myfinance.configuration.user_agent).to eq("My App v1.0")
      expect(Myfinance.configuration.url).to eq("https://sandbox.myfinance.com.br")
    end

    it 'uses a singleton object for the configuration values' do
      config1 = Myfinance.configuration
      config2 = Myfinance.configuration
      expect(config1).to eq(config2)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
myfinance-0.3.0 spec/myfinance_spec.rb
myfinance-0.2.0 spec/myfinance_spec.rb
myfinance-0.1.0 spec/myfinance_spec.rb