Sha256: 0852061c1442c100f6e4f138a607ad9f76868a93e96f1da2213e7e1a517338bb

Contents?: true

Size: 580 Bytes

Versions: 2

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Optimizer::Logic::Predicate::AlwaysTrue#optimize' do
  subject { object.optimize }

  let(:klass)     { Class.new(Optimizer::Logic::Predicate)               }
  let(:attribute) { Attribute::Integer.new(:id)                          }
  let(:predicate) { Logic::Predicate::Equality.new(attribute, attribute) }
  let(:object)    { klass.new(predicate)                                 }

  before do
    klass.class_eval { include Optimizer::Logic::Predicate::AlwaysTrue }
  end

  it { should equal(Logic::Proposition::True.instance) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/optimizer/logic/predicate/always_true/optimize_spec.rb
veritas-0.0.1 spec/unit/veritas/optimizer/logic/predicate/always_true/optimize_spec.rb