Module: IntegrationWrapper
- Defined in:
- lib/integration_wrapper/base.rb,
lib/integration_wrapper.rb,
lib/integration_wrapper/online_test.rb
Overview
Nifty class that helps you do online integration tests (e.g. FooTest < OnlineTest) An online integration test is an integration test that uses your Internet connection to communicate with third party APIs. Of course, this integration needs to be tested (this is very important!) Use the switch_to_online_and back method to test your functionality in the ‘online’ mode which will also be used in production when the app is live. e.g.
def test_my_function
switch_to_online_and_back do
# do stuff here ...
# do more stuff here ...
end
end
Works in conjunction with IntegrationWrapper, the nifty class that gives you two kinds of methods, viz. online and offline methods.
Use the rake task ‘test:online’ to execute all the test files in the tests_online directory.
Defined Under Namespace
Classes: Base, OnlineTest
Constant Summary collapse
- VERSION =
'0.0.6'