diff --git a/spec/simple_matchers.rb b/spec/simple_matchers.rb
index <HASH>..<HASH> 100644
--- a/spec/simple_matchers.rb
+++ b/spec/simple_matchers.rb
@@ -26,3 +26,19 @@ def include_hash(hash)
     given.merge(hash) == given
   end
 end
+
+def memory_usage
+  GC.start # Garbage collect
+  `ps -o rss= -p #{$$}`.strip.to_i
+end
+
+def leak_memory
+  simple_matcher("leak memory") do |given|
+    memory_before = memory_usage
+    given.call
+    memory_after = memory_usage
+    result = memory_after > memory_before
+    puts "#{memory_after} > #{memory_before}" if result
+    result
+  end
+end
Added simple matcher (currently unused) for observing memory leaks