and empty_operator compute always true
This commit is contained in:
parent
6e8206b8b4
commit
df7acf70c8
2 changed files with 11 additions and 0 deletions
|
@ -4,4 +4,8 @@ class Logic::EmptyOperator < Logic::BinaryOperator
|
|||
def type = :empty
|
||||
|
||||
def errors(_stable_ids = nil) = []
|
||||
|
||||
def compute(_champs = [])
|
||||
true
|
||||
end
|
||||
end
|
||||
|
|
7
spec/models/logic/empty_operator_spec.rb
Normal file
7
spec/models/logic/empty_operator_spec.rb
Normal file
|
@ -0,0 +1,7 @@
|
|||
describe Logic::EmptyOperator do
|
||||
include Logic
|
||||
|
||||
describe '#compute' do
|
||||
it { expect(empty_operator(empty, empty).compute).to be true }
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue