Move capture_warnings.rb to spec/ folder