spec/workbook_spec.rb in rspreadsheet-0.2.10 vs spec/workbook_spec.rb in rspreadsheet-0.2.11

- old
+ new

@@ -45,6 +45,15 @@ book.create_worksheet('test') book.worksheets('test').should be book.worksheets(1) book['test'].should be book.worksheets(1) book[1].should be book.worksheets(1) end + it 'can access sheet with alternative syntax and always returns the same object' do + book = Rspreadsheet::Workbook.new + book.create_worksheet('test') + book.create_worksheet('test2') + sheet = book.worksheets(1) + book.worksheet(1).should == sheet + book.sheet(1).should == sheet + book.sheets(2).should_not == sheet + end end