Sha256: 1e8457e6bdd485a492796eabb9d7cb3a812624bd6193f077d53bf45c8ee409eb

Contents?: true

Size: 613 Bytes

Versions: 5

Compression:

Stored size: 613 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Connective::Negation::InvertibleOperand, '#optimize' do
  subject { object.optimize }

  let(:attribute) { Attribute::Integer.new(:id)                 }
  let(:operand)   { attribute.eq(1)                             }
  let(:negation)  { Function::Connective::Negation.new(operand) }
  let(:object)    { described_class.new(negation)               }

  before do
    object.should be_optimizable
  end

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

  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/connective/negation/invertible_operand/optimize_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/connective/negation/invertible_operand/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/connective/negation/invertible_operand/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/connective/negation/invertible_operand/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/connective/negation/invertible_operand/optimize_spec.rb