Sha256: 3d0e1c1b614a9ae4df34553737f886c088d6713eb0d722c077e7bdc6704a6b79
Contents?: true
Size: 727 Bytes
Versions: 5
Compression:
Stored size: 727 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Aggregate::Maximum, '.call' do subject { object.call(maximum, value) } let(:object) { described_class } let(:maximum) { 0 } let(:value) { 1 } context 'when the value is greater than the maximum' do let(:value) { 1 } it { should eql(1) } end context 'when the value is equal to the maximum' do let(:value) { 0 } it { should eql(0) } end context 'when the value is less than the maximum' do let(:value) { -1 } it { should eql(0) } end context 'when the value is nil' do let(:value) { nil } let(:maximum) { mock('Maximum') } it { should equal(maximum) } end end
Version data entries
5 entries across 5 versions & 2 rubygems