Warning, file /education/kturtle/spec/expression_spec.rb was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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 "expression" do 0010 it "should work as expected with basic operations (==, !=, >, <, >=, <=)" do 0011 $i.should_run_clean <<-EOS 0012 assert 1 == 1 0013 assert 1 != 2 0014 assert 2 > 1 0015 assert 1 < 2 0016 0017 assert 1 >= 1 0018 assert 2 >= 1 0019 assert 1 <= 1 0020 assert 1 <= 2 0021 EOS 0022 end 0023 0024 it "should raise an error when insufficient values are provided" do 0025 $i.run("assert 1 <").errors?.should be_true 0026 $i.run("assert ==").errors?.should be_true 0027 end 0028 end