spec/calculator_spec.rb in dentaku-0.1.3 vs spec/calculator_spec.rb in dentaku-0.2.1

- old
+ new

@@ -58,7 +58,13 @@ describe 'functions' do it 'should include IF' do calculator.evaluate('if (foo < 8, 10, 20)', :foo => 2).should eq(10) calculator.evaluate('if (foo < 8, 10, 20)', :foo => 9).should eq(20) end + + it 'should include ROUND' do + calculator.evaluate('round(8.2)').should eq(8) + calculator.evaluate('round(8.8)').should eq(9) + calculator.evaluate('round(8.75, 1)').should eq(8.8) + end end end