Sha256: 4b71c3e5eca0d27024c318fcc04b3c045527055e418b00003594d1847e6aa1f0

Contents?: true

Size: 671 Bytes

Versions: 4

Compression:

Stored size: 671 Bytes

Contents

require 'spec_helper'

describe Buff::Client do
  let(:id) { "5160746d54f04a5e3a00000f" }

  subject do
    Buff::Client.new("some_token")
  end

  describe "#initialize" do
    it "allows a token to be set and retrieved" do
      subject.access_token.should eq("some_token")
    end
  end

  describe "#info" do
    before do
      stub_request(:get, "#{base_path}/info/configuration.json?access_token=some_token").
        to_return(fixture("info.txt"))
    end

    it "connects to the correct endpoint" do
      subject.info
    end

    it "retrieves the correct name" do
      subject.info.services.twitter.types.profile.name.should eq("Twitter")
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
buff-0.0.6 spec/lib/buff_spec.rb
buff-0.0.5 spec/lib/buff_spec.rb
buff-0.0.4 spec/lib/buff_spec.rb
buff-0.0.3 spec/lib/buff_spec.rb