Improve testing and file define
Merge pull request #1 from elasticsearch/spec_testing

Improve testing and file define