I believe not, but as I read and read about testing in agile approach, separation between developers and QA, and between tests and specification becomes more and more fuzzy.
I read Test-Driven Development (TDD) as writing the tests before development so they guide developers how to implement particular feature or functionality/behaviour. This is the main difference I see with respect to traditional approach, where developers write tests after implementation or QA writes tests independently to verify implementation.
1. Doesn't TDD creates a danger that tests will replace specification in programmer's opinion?
In extreme case, I imagine a programmer writing the code that will pass only given test cases without understanding whole model. Like a student preparing for the exam, knowing the questions from the previous exam session without deep understanding of answers.
2. Who writes those tests that guide developers: QA or developers themselves?
If QA writes low-level tests, than she automatically constrains developer how to design APIs of basic classes and acts as a developer. On the other side, developers tend to forget about many test cases and write very basic ones. So I believe both players need to play in the game, but how and when they enter into the game? What roles they play in writing the tests in which phase of project?