Sha256: 165524ac805e96c5bf8a394a492ea1cdd34a1d737c669e8719f211e150fe5c73

Contents?: true

Size: 395 Bytes

Versions: 7

Compression:

Stored size: 395 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Optimizer::Function::Util, '.attribute?' do
  subject { object.attribute?(operand) }

  let(:object) { Optimizer::Function::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

7 entries across 7 versions & 2 rubygems

Version Path
axiom-optimizer-0.2.0 spec/unit/axiom/optimizer/function/util/class_methods/attribute_spec.rb
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/function/util/class_methods/attribute_spec.rb
axiom-optimizer-0.1.0 spec/unit/axiom/optimizer/function/util/class_methods/attribute_spec.rb
veritas-optimizer-0.0.7 spec/unit/veritas/optimizer/function/util/class_methods/attribute_spec.rb
veritas-optimizer-0.0.6 spec/unit/veritas/optimizer/function/util/class_methods/attribute_spec.rb
veritas-optimizer-0.0.5 spec/unit/veritas/optimizer/function/util/class_methods/attribute_spec.rb
veritas-optimizer-0.0.4 spec/unit/veritas/optimizer/function/util/class_methods/attribute_spec.rb