spec/evaluator_spec.rb in dentaku-0.2.6 vs spec/evaluator_spec.rb in dentaku-0.2.7

- old
+ new

@@ -53,9 +53,15 @@ it 'should respect explicit grouping' do evaluator.evaluate(token_stream(:open, 1, :add, 1, :close, :multiply, 5)).should eq(10) end end + describe 'functions' do + it 'should evaluate function' do + evaluator.evaluate(token_stream(:round, :open, 5, :divide, 3.0, :close)).should eq 2 + end + end + describe 'logic' do it 'should evaluate conditional' do evaluator.evaluate(token_stream(5, :gt, 1)).should be_true end