attempt to refactor spec tests using macros and shared examples