Sha256: 801831269138fe9d21fa1c28eb89e212ee4db869e774eb83e014ba46dd1b9690

Contents?: true

Size: 598 Bytes

Versions: 15

Compression:

Stored size: 598 Bytes

Contents

require 'csv'

module Adhoq
  RSpec.describe Reporter::Csv, type: :model do
    describe '.mime_type' do
      specify { expect(Adhoq::Reporter::Csv.mime_type).to eq 'text/csv; charset=UTF-8' }
    end

    context 'create xlsx report' do
      let(:report_data) do
        ex = Adhoq::AdhocExecution.new('csv', attributes_for(:adhoq_query, :greeting)[:query])

        Adhoq::Reporter.generate(ex)
      end

      specify do
        expect(CSV.parse(report_data.read)).to eq [
          %w[name description],
          ['hello', 'English greeting message']
        ]
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
adhoq-1.0.2 spec/adhoq/reporter/csv_spec.rb
adhoq-1.0.1 spec/adhoq/reporter/csv_spec.rb
adhoq-1.0.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.5.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.5.0.beta1 spec/adhoq/reporter/csv_spec.rb
adhoq-0.4.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.3.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.2.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.1.2 spec/adhoq/reporter/csv_spec.rb
adhoq-0.1.1 spec/adhoq/reporter/csv_spec.rb
adhoq-0.1.0 spec/adhoq/reporter/csv_spec.rb
adhoq-0.0.7 spec/adhoq/reporter/csv_spec.rb
adhoq-0.0.6 spec/adhoq/reporter/csv_spec.rb
adhoq-0.0.5 spec/adhoq/reporter/csv_spec.rb
adhoq-0.0.4 spec/adhoq/reporter/csv_spec.rb