Module: AsyncRackTest::Methods
- Includes:
- Rack::Test::Methods
- Defined in:
- lib/async_rack_test.rb
Instance Method Summary collapse
-
#async_app ⇒ Object
The original app.
- #sync_app ⇒ Object
- #use_async ⇒ Object
- #use_sync ⇒ Object
Instance Method Details
#async_app ⇒ Object
The original app
13 14 15 |
# File 'lib/async_rack_test.rb', line 13 def async_app @async_app ||= app end |
#sync_app ⇒ Object
16 17 18 19 20 |
# File 'lib/async_rack_test.rb', line 16 def sync_app @sync_app ||= begin ResyncApp.new(async_app) end end |
#use_async ⇒ Object
26 27 28 29 |
# File 'lib/async_rack_test.rb', line 26 def use_async async_app # Ensure we have cached the original app first. self.instance_eval { class << self; self; end }.class_eval { alias :app :async_app } end |
#use_sync ⇒ Object
22 23 24 25 |
# File 'lib/async_rack_test.rb', line 22 def use_sync async_app # Ensure we have cached the original app first. self.instance_eval { class << self; self; end }.class_eval { alias :app :sync_app } end |