Sha256: 8cb70dd319877e0eeb974db0b6421a254b1b94ed8659184a77297a99beb8f578

Contents?: true

Size: 485 Bytes

Versions: 9

Compression:

Stored size: 485 Bytes

Contents

require 'spec_helper'
module Alf
  class Aggregator
    describe Min do

      let(:rel){[
        {:qty => 10}, 
        {:qty => 0}
      ]}

      it 'should work when used standalone' do
        Min.new{ qty }.aggregate([]).should eq(nil)
        Min.new{ qty }.aggregate(rel).should eq(0)
      end

      it 'should install factory methods' do
        Aggregator.min{ qty }.should be_a(Min)
        Aggregator.min{ qty }.aggregate(rel).should eq(0)
      end

    end
  end
end 

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
alf-core-0.15.0 spec/unit/alf-aggregator/test_min.rb
alf-core-0.14.0 spec/unit/alf-aggregator/test_min.rb
alf-core-0.13.1 spec/unit/alf-aggregator/test_min.rb
alf-core-0.13.0 spec/unit/alf-aggregator/test_min.rb
alf-0.12.2 spec/unit/alf-core/aggregator/test_min.rb
alf-0.12.1 spec/unit/alf-core/aggregator/test_min.rb
alf-0.12.0 spec/unit/alf-core/aggregator/test_min.rb
alf-0.11.1 spec/unit/alf-core/aggregator/test_min.rb
alf-0.11.0 spec/unit/alf-core/aggregator/test_min.rb