Sha256: 9e193464818f77cf354ad5bf614fadfe72f617949f9acc40563fc646c53f66e2

Contents?: true

Size: 551 Bytes

Versions: 5

Compression:

Stored size: 551 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

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

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

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

    it { should == 1 }
  end

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

    it { should == 1 }
  end

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

    it { should == 1 }
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

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