Fix #47: Use anonymous class in spec