Sha256: 1026ed3d6ce756c0ca5c5d4b3c35391e7b175d8ea695771c5779e2f083afa368

Contents?: true

Size: 521 Bytes

Versions: 2

Compression:

Stored size: 521 Bytes

Contents

require './dullard'

describe "dullard" do
  before(:each) do
    @file = File.open("SHAPE5_CorePrePost.xlsx")
    @xlsx = Dullard::Workbook.new @file
  end
  it "can open a file" do
    @xlsx.should_not be_nil
  end

  it "can find sheets" do
    @xlsx.sheets.count.should == 1
  end

  it "can read rows" do
    @xlsx.sheets[0].rows.first.count.should >= 300
  end

  it "reads the right number of rows" do
    count = 0
    @xlsx.sheets[0].rows.each do |row|
      count += 1
    end
    count.should == 115
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dullard-0.0.2 specs/dullard_spec.rb
dullard-0.0.1 specs/dullard_spec.rb