Sha256: 7b07b31227d875d8759048e4f2dbe214ce345bcdb10dbd1ebf11fdc6337d2987

Contents?: true

Size: 624 Bytes

Versions: 3

Compression:

Stored size: 624 Bytes

Contents

# frozen_string_literal: true

require 'json'

RSpec.describe SoapyBing::Ads::Parsers::BulkCsvParser do
  describe '#rows' do
    subject(:rows) { described_class.new(csv_data).rows }

    let(:csv_fixture_path) do
      File.join('spec', 'fixtures', 'ads', 'campaigns_by_account_id.csv')
    end
    let(:csv_data) { File.read(csv_fixture_path) }

    let(:json_fixture_path) do
      File.join('spec', 'fixtures', 'ads', 'campaigns_by_account_id.json')
    end
    let(:json_data) { JSON.parse(File.read(json_fixture_path)) }

    it 'responds with array of Hashes' do
      expect(rows).to eq json_data
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
soapy_bing-1.0.1 spec/soapy_bing/ads/parsers/bulk_csv_parser_spec.rb
soapy_bing-1.0.0 spec/soapy_bing/ads/parsers/bulk_csv_parser_spec.rb
soapy_bing-0.4.0 spec/soapy_bing/ads/parsers/bulk_csv_parser_spec.rb