mocking Rails to fix specs