Sha256: 58876c7d13d10cd76b446b4671bf762f112356d4638c1e286e2d8b3867cf64bf

Contents?: true

Size: 746 Bytes

Versions: 6

Compression:

Stored size: 746 Bytes

Contents

# encoding: utf-8
require 'spec_helper'

describe SimpleSpreadsheet do
  
  describe "Open CSV (.csvt) file read-only mode" do
    before do
      @workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.csvt"))
    end
    it "should can open the file" do
      @workbook.should_not be_nil
    end
    it "should use right class" do
      @workbook.class.to_s.should eq("CsvtReader")
    end
    it "should see the right number of sheets" do
      @workbook.sheets.count.should eq(1)
    end
    it "should read strings from first sheets" do
      @workbook.cell(1,1).should eq("String1")
    end
    it "should read integer from first sheets" do
      @workbook.cell(1,2).should eq("1")
    end
  end
  
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
simple-spreadsheet-0.1.0 spec/simple-spreadsheet_csvt_spec.rb
simple-spreadsheet-0.0.6 spec/simple-spreadsheet_csvt_spec.rb
simple-spreadsheet-0.0.5.4 spec/simple-spreadsheet_csvt_spec.rb
simple-spreadsheet-0.0.5.3 spec/simple-spreadsheet_csvt_spec.rb
simple-spreadsheet-0.0.5.2 spec/simple-spreadsheet_csvt_spec.rb
simple-spreadsheet-0.0.5.1 spec/simple_spreadsheet_csvt_spec.rb