Refactor rspec testing and add Application helper