# coding: utf-8 require_relative '../spreadsheet' # 计算 describe 'Sheet2' do def sheet2; $spreadsheet ||= Spreadsheet.new; $spreadsheet.sheet2; end it 'cell e4 should equal 270.0' do sheet2.e4.should be_within(27.0).of(270.0) end it 'cell e5 should equal 210.0' do sheet2.e5.should be_within(21.0).of(210.0) end it 'cell e6 should equal 160.0' do sheet2.e6.should be_within(16.0).of(160.0) end it 'cell d7 should equal 300.0' do sheet2.d7.should be_within(30.0).of(300.0) end it 'cell e7 should equal 640.0' do sheet2.e7.should be_within(64.0).of(640.0) end end