refactor spec to use let and dynamic matchers