Class: IntegrationWrapper::OnlineTest
- Inherits:
-
ActiveRecord::TestCase
- Object
- ActiveRecord::TestCase
- IntegrationWrapper::OnlineTest
- Defined in:
- lib/integration_wrapper/online_test.rb
Instance Method Summary collapse
- #setup ⇒ Object
-
#switch_to_online_and_back ⇒ Object
Switch to online and back.
- #teardown ⇒ Object
Instance Method Details
#setup ⇒ Object
43 44 45 |
# File 'lib/integration_wrapper/online_test.rb', line 43 def setup IntegrationWrapper.mode = IntegrationWrapper::MODE_ONLINE end |
#switch_to_online_and_back ⇒ Object
Switch to online and back. Supplanted by the setup and teardown methods.
34 35 36 37 38 39 40 41 |
# File 'lib/integration_wrapper/online_test.rb', line 34 def switch_to_online_and_back # Go to online IntegrationWrapper.mode = IntegrationWrapper::MODE_ONLINE # yield yield # Set it back to offline because other tests will be using this as well. IntegrationWrapper.mode = IntegrationWrapper::MODE_OFFLINE end |
#teardown ⇒ Object
47 48 49 |
# File 'lib/integration_wrapper/online_test.rb', line 47 def teardown IntegrationWrapper.mode = IntegrationWrapper::MODE_OFFLINE end |