Sha256: 767c4bfd42ac1262d05dd46d620e578e80934c37ef7dbde3a877b7c90115b4fe
Contents?: true
Size: 729 Bytes
Versions: 2
Compression:
Stored size: 729 Bytes
Contents
# encoding: utf-8 require 'spec_helper' describe Aggregate::Minimum, '.call' do subject { object.call(minimum, value) } let(:object) { described_class } let(:minimum) { 0 } let(:value) { 1 } context 'when the value is greater than the minimum' do let(:value) { 1 } it { should eql(0) } end context 'when the value is equal to the minimum' do let(:value) { 0 } it { should eql(0) } end context 'when the value is less than the minimum' do let(:value) { -1 } it { should eql(-1) } end context 'when the value is nil' do let(:value) { nil } let(:minimum) { double('Minimum') } it { should be(minimum) } end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
axiom-0.2.0 | spec/unit/axiom/aggregate/minimum/class_methods/call_spec.rb |
axiom-0.1.1 | spec/unit/axiom/aggregate/minimum/class_methods/call_spec.rb |