Sha256: c9d5a09e91923cf6cf9fef1cd742b505f0316500e94242090e528384d7ee3557

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

  let(:object) { Optimizer::Function::Util }

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

    it { should == 10 }
  end

  context 'with a String attribute' do
    let(:operand) { Attribute::String.new(:id, min_length: 1, max_length: 10) }

    it { should == 10 }
  end

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

    it { should == 1 }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
axiom-optimizer-0.1.1 spec/unit/axiom/optimizer/function/util/class_methods/max_spec.rb