[Validator] Improve regression test for `undefined method `spec_consumer'`

- let spec in "validates a podspec with dependencies" validate
- fixed a bug in `write_podspec`