Sha256: 070d0e031307aac262174132a3ab3e7341701df5b8324576e67e7b0175bffa0a
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
# encoding: utf-8 require 'spec_helper' describe SimpleSpreadsheet do describe "Open Excelx (.xlsx) file read-only mode" do before do @workbook = SimpleSpreadsheet::Workbook.read(File.join(File.dirname(__FILE__), "fixtures/file.xlsx")) 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("ExcelxReader") end it "should see the right number of sheets" do @workbook.sheets.count.should eq(2) 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 it "should read strings from other sheets" do @workbook.cell(1, 1, 2).should eq("String2") end it "should read integer from other sheets" do @workbook.cell(1, 2, 2).should eq(2) end it "should read strings from other sheets (way 2)" do @workbook.default_sheet = 2 @workbook.cell(1, 1).should eq("String2") end it "should read integer from other sheets (way 2)" do @workbook.default_sheet = 2 @workbook.cell(1, 2).should eq(2) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
simple-spreadsheet-0.0.5.2 | spec/simple-spreadsheet_xlsx_spec.rb |
simple-spreadsheet-0.0.5.1 | spec/simple_spreadsheet_xlsx_spec.rb |