spec/cell_spec.rb in rspreadsheet-0.4.3 vs spec/cell_spec.rb in rspreadsheet-0.4.4

- old
+ new

@@ -369,9 +369,23 @@ @usdcell.format.currency.should == 'USD' @czkcell = @sheet2.cell('B23') @czkcell.value.should == 344.to_d @czkcell.format.currency.should == 'CZK' + + @czkcell.value = 200.to_d + @czkcell.value.should == 200.to_d + @czkcell.format.currency.should == 'CZK' + end + it 'preserves currency format when float is assingned to it' do + @cell = @sheet2.cell('B23') + @cell.type.should eq :currency + @cell.format.currency.should == 'CZK' + + @cell.value = 666.66.to_d + @cell.value.should == 666.66.to_d + @cell.type.should eq :currency + @cell.format.currency.should == 'CZK' end it 'is possible to manipulate borders of cells' do @cell = @sheet1.cell(1,1) [@cell.format.top,@cell.format.left,@cell.format.right,@cell.format.bottom].each do |border|