Sha256: 7bde4fe2ec8cf5749905a83848a343e46c457288e298e0b67dc6de5eb6b388ac
Contents?: true
Size: 956 Bytes
Versions: 2
Compression:
Stored size: 956 Bytes
Contents
require "spec_helper" describe Rexpense do it "has a version number" do expect(Rexpense::VERSION).to_not be_nil end describe "configuration" do it "should be done via block initialization" do Rexpense.configure do |c| c.user_agent = "My App v1.0" c.url = "https://sandbox.rexpense.com" c.version = 'v1' end expect(Rexpense.configuration.user_agent).to eq("My App v1.0") expect(Rexpense.configuration.url).to eq("https://sandbox.rexpense.com") expect(Rexpense.configuration.version).to eq("v1") end it "uses a singleton object for the configuration values" do config1 = Rexpense.configuration config2 = Rexpense.configuration expect(config1).to eq(config2) end end describe ".client" do it "instantiates a new client" do expect(Rexpense::Client).to receive(:new).with("abc").and_call_original Rexpense.client("abc") end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rexpense-2.1.0 | spec/lib/rexpense_spec.rb |
rexpense-2.0.0 | spec/lib/rexpense_spec.rb |