class_eval is dangerous to use, as it injects a string into a class as
ruby code, meaning that it's very easy to make mistakes. In this case
there is no need to use it, and I have re-written this test to use
multiple assertions per test instead (also not ideal, but better).
I've also made this test use the same assertion helpers as every other
test (previously it was defining it's own assertion helpers).
class_eval
is dangerous to use, as it injects a string into a class as ruby code, meaning that it's very easy to make mistakes. In this case there is no need to use it, and I have re-written this test to use multiple assertions per test instead (also not ideal, but better).I've also made this test use the same assertion helpers as every other test (previously it was defining it's own assertion helpers).