Sha256: 2a318d28ca115a1fa36c906e862f9fd763d16f00f93a493467d882e920bd5dc9

Contents?: true

Size: 399 Bytes

Versions: 2

Compression:

Stored size: 399 Bytes

Contents

require 'spec_helper'

describe 'Veritas::Optimizer::Logic::Predicate::Util.attribute?' do
  subject { object.attribute?(operand) }

  let(:object) { Optimizer::Logic::Predicate::Util }

  context 'with an attribute' do
    let(:operand) { Attribute::Integer.new(:id) }

    it { should be(true) }
  end

  context 'with a constant' do
    let(:operand) { 1 }

    it { should be(false) }
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
veritas-0.0.2 spec/unit/veritas/optimizer/logic/predicate/util/class_methods/attribute_spec.rb
veritas-0.0.1 spec/unit/veritas/optimizer/logic/predicate/util/class_methods/attribute_spec.rb