DRY up the test with simple Ruby