module RSpec::Rails::Matchers::BaseMatcher::HashFormatting

def improve_hash_formatting(inspect_string)

This is idempotent and safe to run on a string multiple times.

{:a => 5, :b => 2}

...but it looks much better as:

{:a=>5, :b=>2}

`{ :a => 5, :b => 2 }.inspect` produces:
def improve_hash_formatting(inspect_string)
  inspect_string.gsub(/(\S)=>(\S)/, '\1 => \2')
end