提交 389c4fc2 编写于 作者: A Aaron Patterson

add an operator to inequality

上级 21267d3c
......@@ -197,6 +197,7 @@ def complement
Equality.new(operand1, operand2)
end
def operator; :"!=" end
def eval(row)
operand1.eval(row) != operand2.eval(row)
end
......
......@@ -12,6 +12,12 @@ module Predicates
@b = Inequality.new(right, left)
end
describe 'operator' do
it "should have one" do
@a.operator.should == :"!="
end
end
describe '==' do
it "is equal to itself" do
@a.should == @a
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册