Sha256: 3e7936ba2ab5da090ea259d0037fa10a609fda2078bbdd7f0cef5d4246775e41

Contents?: true

Size: 473 Bytes

Versions: 5

Compression:

Stored size: 473 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:attribute) { Attribute::Integer.new(:id)  }
  let(:operand)   { attribute.eq(1)              }
  let(:object)    { described_class.new(operand) }

  it_should_behave_like 'an idempotent method'

  it 'returns the operand' do
    should equal(operand)
  end

  it 'is not invertible' do
    subject.inverse.should_not eql(object)
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/axiom/function/connective/negation/inverse_spec.rb
veritas-0.0.7 spec/unit/veritas/function/connective/negation/inverse_spec.rb
veritas-0.0.6 spec/unit/veritas/function/connective/negation/inverse_spec.rb
veritas-0.0.5 spec/unit/veritas/function/connective/negation/inverse_spec.rb
veritas-0.0.4 spec/unit/veritas/function/connective/negation/inverse_spec.rb