Sha256: da9b8d06dccfd20513b7fd4ed9b03bf7edfe3936b063c5c8a0a3a0916c530eb8

Contents?: true

Size: 645 Bytes

Versions: 2

Compression:

Stored size: 645 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:attribute)  { Attribute::Integer.new(:id)     }
  let(:left)       { attribute.include([1])          }
  let(:right)      { attribute.exclude([2])          }
  let(:connective) { left.and(left.and(right))       }
  let(:object)     { described_class.new(connective) }

  before do
    expect(object).to be_optimizable
  end

  it { should be_kind_of(Function::Connective::Conjunction) }

  its(:left) { should eql(attribute.eq(1)) }

  its(:right) { should eql(attribute.ne(2)) }
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/function/connective/binary/redundant_right/optimize_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/function/connective/binary/redundant_right/optimize_spec.rb