Sha256: 5006b5659cfada1cfaaf23ea0039d4b4d58a211058f09777fe20b9845d74baae
Contents?: true
Size: 899 Bytes
Versions: 15
Compression:
Stored size: 899 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 describe ".client" do it "instantiates a new client" do expect(Myfinance::Client).to receive(:new).with("abc", 12).and_call_original Myfinance.client("abc", 12) end end end
Version data entries
15 entries across 15 versions & 1 rubygems