Displaying 1 result from an estimated 1 matches for "audititem".
2007 Oct 08
0
Using mocks in classes
I am mocking a rails model that hasn''t been implemented and belongs_to a
model that I am developing with rspec.
The model in development, Audit, has_many AuditItems which is being mocked.
When created, Audit creates the first instance of AuditItem.
To enable me to mock AuditItem I have created a factory method in Audit to
create the AuditItem, rather than creating it in the initialize method;
that way I can defined a new class MockAudit and overide the
creat...