spec/unit/operations/negation_spec.rb in dry-logic-0.4.2 vs spec/unit/operations/negation_spec.rb in dry-logic-0.5.0
- old
+ new
@@ -8,9 +8,18 @@
describe '#call' do
it 'negates its rule' do
expect(operation.('19')).to be_success
expect(operation.(17)).to be_failure
end
+
+ context 'double negation' do
+ subject(:double_negation) { Operations::Negation.new(operation) }
+
+ it 'works as rule' do
+ expect(double_negation.('19')).to be_failure
+ expect(double_negation.(17)).to be_success
+ end
+ end
end
describe '#to_ast' do
it 'returns ast' do
expect(operation.to_ast).to eql(