Sha256: 044b75686f5e4f738aaa0736c74489959b9a365764cfa625c50bea15b4d63e44

Contents?: true

Size: 562 Bytes

Versions: 2

Compression:

Stored size: 562 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
    expect(object).to be_optimizable
  end

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

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

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