Sha256: 4aba7969362aed94793e9bcb0a3f72823ff6d658e4144475355e800f925ff3a0

Contents?: true

Size: 877 Bytes

Versions: 4

Compression:

Stored size: 877 Bytes

Contents

require 'spec_helper'

describe Roo::Google do
  let(:key) { '0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c' }

  describe '.new' do
    context 'given a username and password' do
      let(:user) { 'user' }
      let(:password) { 'password' }

      subject {
        Roo::Google.new(key, user: user, password: password)
      }

      it 'creates an instance' do
        VCR.use_cassette('google_drive') do
          expect(subject).to be_a(Roo::Google)
        end
      end
    end

    context 'given an access token' do
      let(:access_token) { 'ya29.AHES6ZR1kGjlmlLJG9skjpO0IjzQ6qDohXwFJclzD7mHI9xa-cFzlg' }

      subject {
        Roo::Google.new(key, access_token: access_token)
      }

      it 'creates an instance' do
        VCR.use_cassette('google_drive_access_token') do
          expect(subject).to be_a(Roo::Google)
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
roo-1.13.0 spec/lib/roo/google_spec.rb
roo-1.12.2 spec/lib/roo/google_spec.rb
roo-1.12.1 spec/lib/roo/google_spec.rb
roo-1.12.0 spec/lib/roo/google_spec.rb