Sha256: 0282a5f1fffdecee974aabe97ccbdffda92055dd11ad3c19300adbe1dd9e503b

Contents?: true

Size: 695 Bytes

Versions: 1

Compression:

Stored size: 695 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Function::Connective::Conjunction, '#inverse' do
  subject { object.inverse }

  let(:attribute) { Attribute::Integer.new(:id)      }
  let(:left)      { attribute.gt(1)                  }
  let(:right)     { attribute.lt(3)                  }
  let(:object)    { described_class.new(left, right) }

  it_should_behave_like 'an idempotent method'

  it { should be_kind_of(Function::Connective::Disjunction) }

  its(:left) { should eql(Function::Connective::Negation.new(object.left)) }

  its(:right) { should eql(Function::Connective::Negation.new(object.right)) }

  it 'is invertible' do
    subject.inverse.should equal(object)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.4 spec/unit/veritas/function/connective/conjunction/inverse_spec.rb