This project is archived and is in readonly mode.
Allow ActiveResource to use IntegrationTests for requests
-
Taryn
This looks pretty promising and would be extremely useful not to have to rely on HttpMock (which is limited).
But I'm not sure what the abilities/limitations of the above approach are.
Can you give some realistic examples of use?
Cheers and thanks,
Taryn
[who eventually figured out how to signup*]- Hint: don't click 'sign-up' at top-right...
-
Steffen Bartsch
Taryn, I suppose that you are asking for limitations compared to full stack tests with ActiveResource querying a server instance. I haven't stumbled over any, yet, so I can only think areas where issues might come from. All that is abstracted away is Net::HTTP, so you won't test any HTTP-specific stuff, e.g. doing SSL-related requests. Everything else depends on the IntegrationTest implementation of Rails: if a specific HTTP feature was missing there, you won't be able to use it in this approach.
For me it helped a lot in testing a synchronization client and server. I'm not sure, how more relevant usage examples would look like. My tests aren't doing more then the above example: setting up the environment on the server, calling client APIs inside the with_integration_test_session block and asserting the results. What kind of example were you thinking of?
-
Rohit Arondekar
- State changed from new to stale
- Importance changed from to
Marking ticket as stale. If this is still an issue please leave a comment with suggested changes, creating a patch with tests, rebasing an existing patch or just confirming the issue on a latest release or master/branches.
