Fix conflict with Devise generator

(This is a revised version of the original pull request, cleaning up the commit history to only the needed change.)

This patch allows Prototype-Rails to work with the latest Devise generators. As requested, this no longer uses Rails.env to check whether TestCase is loaded.