Sha256: 9d32e7b4959bcbf721ad325aa3053f1cd7b196a0747f63ce9d7eb551dfc4272d

Contents?: true

Size: 577 Bytes

Versions: 2

Compression:

Stored size: 577 Bytes

Contents

require 'spec_helper'

describe Sepparator do

  context '.csv_to_excel' do
    it 'creates a converter and uses it appropriately' do
      col_sep = ','
      csv_path = 'foo/bar.csv'
      xls_path = 'bla/fu.xls'
      sheet_name = 'my sheet'
      converter = stub
      Sepparator::SpreadsheetConverter.should_receive(:new).with(col_sep: col_sep).and_return(converter)
      converter.should_receive(:convert).with(csv_path, xls_path, sheet_name: sheet_name)

      Sepparator.csv_to_excel(csv_path, xls_path, sheet_name: sheet_name, col_sep: col_sep)
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sepparator-0.0.4 spec/sepparator_spec.rb
sepparator-0.0.3 spec/sepparator_spec.rb