Refactor add_messages to be string based.
Add rspec helpers for testing.