Sha256: c57ec5ca60075872e190a94e2a18e7665b0b467246cca38856cd9f0fc9ec4210

Contents?: true

Size: 698 Bytes

Versions: 1

Compression:

Stored size: 698 Bytes

Contents

require 'spec_helper'

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

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

  before do
    predicate.should be_kind_of(Logic::Predicate::Comparable)
  end

  it { should be_kind_of(Logic::Predicate::Equality) }

  its(:left) { should equal(attribute) }

  its(:right) { should == 1 }
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/optimizer/logic/predicate/comparable/normalizable_operands/optimize_spec.rb