File indexing completed on 2024-04-21 03:45:23

0001 #  SPDX-FileCopyrightText: 2009 Cies Breijs
0002 #  SPDX-FileCopyrightText: 2009 Niels Slot
0003 #
0004 #  SPDX-License-Identifier: GPL-2.0-or-later
0005 
0006 require File.dirname(__FILE__) + '/spec_helper.rb'
0007 $i = Interpreter.instance
0008 
0009 describe "boolean operator" do
0010   it "should work as expected with basic operations (and, or, not)" do
0011     $i.should_run_clean <<-EOS
0012       assert true and true
0013       assert true or true
0014       assert not false
0015     EOS
0016   end
0017 
0018   it "should raise an error when insufficient values are provided" do
0019     $i.run("assert true and").errors?.should be_true
0020     $i.run("assert and true").errors?.should be_true
0021     $i.run("assert or").errors?.should be_true
0022     $i.run("assert not").errors?.should be_true
0023   end
0024 end