(fakes, method)
| 1832 | var reverse = arrayProto.reverse; |
| 1833 | |
| 1834 | function applyOnEach(fakes, method) { |
| 1835 | var matchingFakes = filter(fakes, function(fake) { |
| 1836 | return typeof fake[method] === "function"; |
| 1837 | }); |
| 1838 | |
| 1839 | forEach(matchingFakes, function(fake) { |
| 1840 | fake[method](); |
| 1841 | }); |
| 1842 | } |
| 1843 | |
| 1844 | function Sandbox() { |
| 1845 | var sandbox = this; |