spec/rspreadsheet_spec.rb in rspreadsheet-0.4.5 vs spec/rspreadsheet_spec.rb in rspreadsheet-0.4.7

- old
+ new

@@ -2,14 +2,14 @@ using ClassExtensions if RUBY_VERSION > '2.1' describe Rspreadsheet do before do @tmp_filename = '/tmp/testfile.ods' # delete temp file before tests - File.delete(@tmp_filename) if File.exists?(@tmp_filename) + File.delete(@tmp_filename) if File.exist?(@tmp_filename) end after do - File.delete(@tmp_filename) if File.exists?(@tmp_filename) # delete temp file after tests + File.delete(@tmp_filename) if File.exist?(@tmp_filename) # delete temp file after tests end it 'can open ods testfile and reads its content correctly' do book = Rspreadsheet.new($test_filename) s = book.worksheets(1) @@ -117,10 +117,10 @@ # saving file book.save book.save('/tmp/different_filename.ods') end.not_to raise_error - File.delete('/tmp/different_filename.ods') if File.exists?('/tmp/different_filename.ods') # delete after tests + File.delete('/tmp/different_filename.ods') if File.exist?('/tmp/different_filename.ods') # delete after tests end it 'examples from advanced syntax GUIDE are working' do def p(*par); end # supress p in the example expect do book = Rspreadsheet::Workbook.new