Module: RSMP::Validator::AsyncContext

Defined in:
lib/rsmp/validator/async_context.rb

Overview

Sus fixture module that runs each test inside the shared Async reactor. Include this in the sus base class to ensure all tests run within the reactor context.

Instance Method Summary collapse

Instance Method Details

#aroundObject



6
7
8
9
10
11
12
# File 'lib/rsmp/validator/async_context.rb', line 6

def around
  RSMP::Validator.reactor.run do |_task|
    yield
  ensure
    RSMP::Validator.reactor.interrupt
  end
end