|
24 | 24 | c.clamp(two, three).should equal(c) |
25 | 25 | end |
26 | 26 |
|
27 | | - it 'returns the min parameter if smaller than it' do |
| 27 | + it 'returns the min parameter if less than it' do |
28 | 28 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
29 | 29 | two = ComparableSpecs::WithOnlyCompareDefined.new(2) |
30 | 30 | c = ComparableSpecs::Weird.new(0) |
|
52 | 52 | c.clamp(two..three).should equal(c) |
53 | 53 | end |
54 | 54 |
|
55 | | - it 'returns the minimum value of the range parameters if smaller than it' do |
| 55 | + it 'returns the minimum value of the range parameters if less than it' do |
56 | 56 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
57 | 57 | two = ComparableSpecs::WithOnlyCompareDefined.new(2) |
58 | 58 | c = ComparableSpecs::Weird.new(0) |
|
77 | 77 | end |
78 | 78 |
|
79 | 79 | context 'with endless range' do |
80 | | - it 'returns minimum value if smaller than it' do |
| 80 | + it 'returns minimum value of the range parameters if less than it' do |
81 | 81 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
82 | 82 | zero = ComparableSpecs::WithOnlyCompareDefined.new(0) |
83 | 83 | c = ComparableSpecs::Weird.new(0) |
|
86 | 86 | c.clamp(zero..).should equal(c) |
87 | 87 | end |
88 | 88 |
|
89 | | - it 'always returns self if greater than minimum value' do |
| 89 | + it 'always returns self if greater than minimum value of the range parameters' do |
90 | 90 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
91 | 91 | two = ComparableSpecs::WithOnlyCompareDefined.new(2) |
92 | 92 | c = ComparableSpecs::Weird.new(2) |
|
104 | 104 | end |
105 | 105 |
|
106 | 106 | context 'with beginless range' do |
107 | | - it 'returns maximum value if greater than maximum value' do |
| 107 | + it 'returns maximum value of the range parameters if greater than it' do |
108 | 108 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
109 | 109 | c = ComparableSpecs::Weird.new(2) |
110 | 110 |
|
111 | 111 | c.clamp(..one).should equal(one) |
112 | 112 | end |
113 | 113 |
|
114 | | - it 'always returns self if smaller than it' do |
| 114 | + it 'always returns self if less than maximum value of the range parameters' do |
115 | 115 | one = ComparableSpecs::WithOnlyCompareDefined.new(1) |
116 | 116 | zero = ComparableSpecs::WithOnlyCompareDefined.new(0) |
117 | 117 | c = ComparableSpecs::Weird.new(0) |
|
0 commit comments