Refactored spec test code and created helpers/application.rb and ApplicationHelper module