Sha256: f720633456febcb5f53724a6aa7373fffbc9167fa2f359498f4fa9afd34f39a6

Contents?: true

Size: 621 Bytes

Versions: 4

Compression:

Stored size: 621 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Connective::Conjunction::LeftOperandTautology, '#optimize' do
  subject { object.optimize }

  let(:attribute)  { Attribute::Integer.new(:id)                        }
  let(:left)       { Function::Proposition::Tautology.instance          }
  let(:right)      { attribute.eq(1)                                    }
  let(:connective) { Function::Connective::Conjunction.new(left, right) }
  let(:object)     { described_class.new(connective)                    }

  before do
    object.should be_optimizable
  end

  it { should equal(right) }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/connective/conjunction/left_operand_tautology/optimize_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/connective/conjunction/left_operand_tautology/optimize_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/connective/conjunction/left_operand_tautology/optimize_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/connective/conjunction/left_operand_tautology/optimize_spec.rb