Sha256: 2505e3915ebfed77f0410783ce978735f5b8149a6d9d2662542deda490eb14fd

Contents?: true

Size: 810 Bytes

Versions: 2

Compression:

Stored size: 810 Bytes

Contents

require 'spec_helper'

describe Plurky do

  describe ".client" do
    it "returns a Plurky::Client" do
      expect(Plurky.client).to be_a Plurky::Client
    end

    context "when the options don't change" do
      it "caches the client" do
        expect(Plurky.client).to eq Plurky.client
      end
    end

    context "when the options change" do
      it "creates a new client" do
        client1 = Plurky.client
        Plurky.configure do |config|
          config.consumer_key    = 'CK'
          config.consumer_secret = 'CS'
        end
        client2 = Plurky.client
        expect(client1).not_to eq client2
      end
    end
  end

  describe ".respond_to?" do
    it "delegates to Plurky::Client" do
      expect(Plurky).to respond_to :get
    end
  end

  describe ".configure" do
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
plurky-0.1.3 spec/plurky_spec.rb
plurky-0.1.2 spec/plurky_spec.rb