simplify test code and rename rake task to integration_test