fix spec for method generator