use rails bellow 4 to support tests with ruby 1.8.7