spec/rspreadsheet_spec.rb in rspreadsheet-0.2.12 vs spec/rspreadsheet_spec.rb in rspreadsheet-0.2.14

- old
+ new

@@ -1,6 +1,7 @@ require 'spec_helper' +using ClassExtensions if RUBY_VERSION > '2.1' describe Rspreadsheet do it 'can open ods testfile and reads its content correctly' do book = Rspreadsheet.new($test_filename) s = book.worksheets(1) @@ -40,11 +41,11 @@ end @content_xml2.root.first_diff(@content_xml1.root).should be_nil @content_xml1.root.first_diff(@content_xml2.root).should be_nil - @content_xml1.root.equals?(@content_xml2.root).should == true + @content_xml1.root.should == @content_xml2.root end it 'when open and save file modified, than the file is different' do tmp_filename = '/tmp/testfile1.ods' # first delete temp file File.delete(tmp_filename) if File.exists?(tmp_filename) book = Rspreadsheet.new($test_filename) # than open test file @@ -85,10 +86,10 @@ sheet.cells(5,2).value = 1.78 sheet.cells(5,2).format.bold = true sheet.cells(5,2).format.background_color = '#FF0000' }.not_to raise_error - + sheet.rows(4).cellvalues.sum{|val| val.to_f}.should eq 4+7*4 sheet.rows(4).cells.sum{ |cell| cell.value.to_f }.should eq 4+7*4 total = 0 sheet.rows.each do |row|