spec/calculator_spec.rb in dentaku-0.1.0 vs spec/calculator_spec.rb in dentaku-0.1.1

- old
+ new

@@ -47,6 +47,12 @@ it 'should accept strings or symbols for binding keys' do calculator.evaluate('foo * 2', :foo => 2).should eq(4) calculator.evaluate('foo * 2', 'foo' => 4).should eq(8) end + + describe 'functions' do + it 'should include IF' do + calculator.evaluate('if (foo < 10, 10, 20)', :foo => 2).should eq(10) + end + end end