refactor tests to use pragma approach