Sha256: b9faf072341e23a7a46b1bf3dd6d8376c53b866ee516ab1f4c0d3fbda9ccb4eb

Contents?: true

Size: 513 Bytes

Versions: 5

Compression:

Stored size: 513 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Connective::Binary::EqualOperands, '#optimize' do
  subject { object.optimize }

  let(:attribute)  { Attribute::Integer.new(:id)     }
  let(:left)       { attribute.eq(1)                 }
  let(:right)      { attribute.eq(1)                 }
  let(:connective) { left.and(right)                 }
  let(:object)     { described_class.new(connective) }

  before do
    object.should be_optimizable
  end

  it { should equal(left) }
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/function/connective/binary/equal_operands/optimize_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/connective/binary/equal_operands/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/connective/binary/equal_operands/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/connective/binary/equal_operands/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/connective/binary/equal_operands/optimize_spec.rb