add configurable #app method for rack-test closes #1062