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
48 49 50 |
# File 'lib/integration_wrapper/online_test.rb', line 48 def setup IntegrationWrapper::Base.mode = IntegrationWrapper::Base::MODE_ONLINE end |
#switch_to_online_and_back ⇒ Object
Switch to online and back. Supplanted by the setup and teardown methods.
39 40 41 42 43 44 45 46 |
# File 'lib/integration_wrapper/online_test.rb', line 39 def switch_to_online_and_back # Go to online IntegrationWrapper::Base.mode = IntegrationWrapper::Base::MODE_ONLINE # yield yield # Set it back to offline because other tests will be using this as well. IntegrationWrapper::Base.mode = IntegrationWrapper::Base::MODE_OFFLINE end |
#teardown ⇒ Object
52 53 54 |
# File 'lib/integration_wrapper/online_test.rb', line 52 def teardown IntegrationWrapper::Base.mode = IntegrationWrapper::Base::MODE_OFFLINE end |