require 'spec_helper' describe Me do let(:session) { Fabricate :oauth_session } it 'performs a get on the /me api path' do expect(session).to receive(:get).with('/me').and_return({}) Me.run!(session: session) end it 'returns the me entry from the response' do allow(session).to receive(:get).with('/me').and_return 'me' => 'some_info' expect(Me.run!(session: session)).to eq('some_info') end end