Sha256: 9ff1abbf4ae5a2c5913788d21bc2a8e3a008c1cc18644a7e07f151c172a53da9

Contents?: true

Size: 561 Bytes

Versions: 5

Compression:

Stored size: 561 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:attribute) { Attribute::Integer.new(:id)                     }
  let(:predicate) { Function::Predicate::Equality.new(1, attribute) }
  let(:object)    { described_class.new(predicate)                  }

  before do
    object.should be_optimizable
  end

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

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

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

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/function/predicate/comparable/normalizable_operands/optimize_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/predicate/comparable/normalizable_operands/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/predicate/comparable/normalizable_operands/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/predicate/comparable/normalizable_operands/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/predicate/comparable/normalizable_operands/optimize_spec.rb