You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since most APIs persist data, Rambo needs some way to ensure data exist in the database when tests are run. For version 0.8, we will be adding FactoryGirl to Rambo-generated tests, relying on users to define appropriate factories and deriving the factory name from the resource name in the URI partial. This work is in progress on the add-factory-girl branch.
Expected Behavior
Given a route called /widgets, Rambo-generated tests should instantiate some Widget objects prior to running the tests.
Given a route called /widgets/:id, Rambo-generated tests should intelligently use the ID from one of the Widget objects it has created for the route. (See also issues #87 and #88.)
Current Behavior
Rambo has no way to handle persisted data in its tests.
Technical Challenges
Ensure both ActiveRecord and Sequel are supported. This should come down to the user's FactoryGirl configuration, but we will create some test APIs to verify.
Identify a class given a route name. For version 0.8, we will be assuming that the name of a model is the same as the name of the route - e.g., /widgets corresponds to a Widget class, /books to a Book class, etc.
Determine what resource(s) a route refers to. Especially, in the case of an individual resource route, Rambo-generated tests need to recognize the resource as an instance of a parent collection and draw in an appropriate fixture.
The text was updated successfully, but these errors were encountered:
Summary
Since most APIs persist data, Rambo needs some way to ensure data exist in the database when tests are run. For version 0.8, we will be adding FactoryGirl to Rambo-generated tests, relying on users to define appropriate factories and deriving the factory name from the resource name in the URI partial. This work is in progress on the
add-factory-girl
branch.Expected Behavior
Given a route called
/widgets
, Rambo-generated tests should instantiate someWidget
objects prior to running the tests.Given a route called
/widgets/:id
, Rambo-generated tests should intelligently use the ID from one of theWidget
objects it has created for the route. (See also issues #87 and #88.)Current Behavior
Rambo has no way to handle persisted data in its tests.
Technical Challenges
/widgets
corresponds to aWidget
class,/books
to aBook
class, etc.The text was updated successfully, but these errors were encountered: