
RSpec::Memory makes assertions about memory usage.
Allocating large amounts of objects can lead to memory problems. RSpec::Memory adds a limit_allocations matcher, which tracks the number of allocations and memory size for each object type and allows you to specify expected limits.