Sha256: d9ff7203f42e42e40ec73769d286242a3f9b25e9fb148631d6d2e96f4b7687a9

Contents?: true

Size: 667 Bytes

Versions: 2

Compression:

Stored size: 667 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Predicate::Tautology, '#optimize' do
  subject { object.optimize }

  let(:described_class) { Class.new(Optimizer) { include Optimizer::Function::Binary } }
  let(:attribute)       { Attribute::Integer.new(:id)                                  }
  let(:predicate)       { Function::Predicate::Equality.new(attribute, attribute)      }
  let(:object)          { described_class.new(predicate)                               }

  before do
    described_class.class_eval { include Optimizer::Function::Predicate::Tautology }
  end

  it { should be(Function::Proposition::Tautology.instance) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/function/predicate/tautology/optimize_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/function/predicate/tautology/optimize_spec.rb