refactor with custom rspec matchers