diff --git a/spec/allocator_spec.rb b/spec/allocator_spec.rb index 547c7697..646df772 100644 --- a/spec/allocator_spec.rb +++ b/spec/allocator_spec.rb @@ -172,7 +172,7 @@ expect(monies[3]).to eq(Money.new(25.25)) # <-- gets no penny end - specify "#allocate :roundrobin strategy distributes leftover Yen from left to right" do + specify "#allocate :roundrobin strategy distributes leftovers from left to right when the currency does not use two decimal places (e.g. `JPY`)" do #Roundrobin for 1 yen monies = new_allocator(31, 'JPY').allocate([0.5,0.5], :roundrobin) expect(monies[0]).to eq(Money.new(16, 'JPY')) @@ -188,7 +188,7 @@ expect(monies[5]).to eq(Money.new(5860, "JPY")) # <-- gets no yen end - specify "#allocate :roundrobin_reverse strategy distributes leftover Yen from right to left" do + specify "#allocate :roundrobin_reverse strategy distributes leftovers from right to left when the currency does not use two decimal places (e.g. `JPY`)" do #Roundrobin for 1 yen monies = new_allocator(31, 'JPY').allocate([0.5,0.5], :roundrobin_reverse) expect(monies[0]).to eq(Money.new(15, 'JPY')) @@ -204,7 +204,7 @@ expect(monies[5]).to eq(Money.new(5861, "JPY")) # <-- gets 1 yen end - specify "#allocate :nearest strategy distributes leftover Yen to the nearest whole Yen" do + specify "#allocate :nearest strategy distributes leftovers to the nearest whole subunity when the currency does not use two decimal places (e.g. `JPY`)" do #Nearest for 1 yen monies = new_allocator(31, 'JPY').allocate([0.5,0.5], :nearest) expect(monies[0]).to eq(Money.new(16, 'JPY'))