4 ms·
Well I think it depends, sqlite can behave as an entirely in-memory database I think - so what would be the difference between that and a pure ruby in-memory da
by scottschulthess 14y ago
Well I think it depends, sqlite can behave as an entirely in-memory database I think - so what would be the difference between that and a pure ruby in-memory database, really?
If you want to just fake 'em all, which does not sound particularly ideal, people just generally mock em
- edwinnathaniel 14y agoYes, my bad for not clarify it: mock the repository part, but not to mock as an entire ActiveRecord. for example: FriendsRepository.java is an interface that can be mocked during unit-test while the integration-test would use the actual implementation. I know that the Java solution tend to be brittle because it somewhat forces people to have 1 interface, 1 class implementation (the mock implementation would be provided by mocking library).