Ok, one person asked me about this problem privately an hour ago, so after a few years, well, just two years, I can answer to my question . Hope it helps other.
This is very easy task, as .htaccess must be available in both directories. And the only difference between them is RewriteBase parameter:
For main directory it will be:
And for test_directory it will be just:
So it's easy to keep whole project in separate directory nested in other one.
I must say that it's funny how everything has changed in my development workflow since this post. For now I'm using VM with Vagrant and Ansible provisioning, Jenkins and so on. For this particular example I would rather expose my VM for somebody, or just create some staging server, etc. however sometimes it's quicker just to put some files somewhere so here is an answer. I hope everything's clear .