spec/evaluator_spec.rb in dentaku-0.2.5 vs spec/evaluator_spec.rb in dentaku-0.2.6
- old
+ new
@@ -73,8 +73,13 @@
it 'should evaluate combined conditionals' do
evaluator.evaluate(token_stream(5, :gt, 1, :or, :false)).should be_true
evaluator.evaluate(token_stream(5, :gt, 1, :and, :false)).should be_false
end
+
+ it 'should support negation of a logical value' do
+ evaluator.evaluate(token_stream(:not, :open, 5, :gt, 1, :or, :false, :close)).should be_false
+ evaluator.evaluate(token_stream(:not, :open, 5, :gt, 1, :and, :false, :close)).should be_true
+ end
end
end
end