Sha256: de69f9d9657a39ebe8827a8033f7f2b1f4981ee2b6dd2b89656a29868a7dba3e

Contents?: true

Size: 870 Bytes

Versions: 4

Compression:

Stored size: 870 Bytes

Contents

# encoding: UTF-8
require 'vcr_setup'
require 'spec_helper'
require 'roo'
require 'google_drive'

describe TableImporter::Source do
  context 'when source is a google file' do
    before(:each) do
      VCR.use_cassette('google_authentication', :record => :new_episodes) do
        @source = TableImporter::Source.new({
          :content => 'CLIENT_ID, ACCESS_TOKEN',
          :headers_present => true,
          :user_headers => nil,
          :user_headers => nil,
          :type => "google",
          :column_separator => "",
          :record_separator => "",
          :compulsory_headers =>
            {:email => true}
          })
      end
    end

    it "gets the correct type" do
      VCR.use_cassette('google_authentication') do
        @source.get_type.should eql("google")
      end
    end

    after(:each) do
      @source = nil
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
table_importer-0.2.3 spec/sources/google_spec.rb
table_importer-0.2.2 spec/sources/google_spec.rb
table_importer-0.2.1 spec/sources/google_spec.rb
table_importer-0.1.1 spec/sources/google_spec.rb