Sha256: 3183db062da0f1ddd5c11bd0d1c5f0d4889c9dc96c44d56a6c720a0f95f409ca
Contents?: true
Size: 821 Bytes
Versions: 1
Compression:
Stored size: 821 Bytes
Contents
require 'spec_helper' require File.expand_path('../fixtures/classes', __FILE__) [ :not, :- ].each do |method| describe "Veritas::Logic::Connective::Negation::Methods##{method}" do subject { object.send(method, predicate) } let(:klass) { NegationMethodsSpecs::Object } let(:header) { Relation::Header.new([ [ :id, Integer ] ]) } let(:predicate) { Logic::Predicate::Equality.new(header[:id], 1) } let(:object) { klass.new } before do def object.eql?(other) equal?(other) end object.freeze end it 'returns a conjunction of the proposition and a inverted predicate' do should eql(Logic::Connective::Conjunction.new(object, Logic::Connective::Negation.new(predicate))) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
veritas-0.0.2 | spec/unit/veritas/logic/connective/negation/methods/not_spec.rb |