Sha256: dc27b3f4bb48020ea08f324dc1d6b13f9ec6f05c626edd96925635e4f97bfc72
Contents?: true
Size: 437 Bytes
Versions: 9
Compression:
Stored size: 437 Bytes
Contents
require 'spec_helper' module Alf class Aggregator describe Avg do let(:rel){[ {:qty => 10}, {:qty => 1} ]} it 'should work when used standalone' do Avg.new{ qty }.aggregate(rel).should eq(5.5) end it 'should install factory methods' do Aggregator.avg{ qty }.should be_a(Avg) Aggregator.avg{ qty }.aggregate(rel).should eq(5.5) end end end end
Version data entries
9 entries across 9 versions & 2 rubygems