This spec could be improved by creating two context blocks which describe the context of each situation. The first one could be 'when user is not logged in' and would include your first test. The second one could be 'when user is logged in' and could include a before block that includes your login_macro code and the rest of your tests.