module RSpec::EM::AsyncSteps::Scheduler

Public Instance Methods

__end_steps__() click to toggle source
# File lib/rspec/eventmachine/async_steps.rb, line 45
def __end_steps__
  @__step_queue__ = []
  __run_next_step__
end
__enqueue__(args) click to toggle source
# File lib/rspec/eventmachine/async_steps.rb, line 24
def __enqueue__(args)
  @__step_queue__ ||= []
  @__step_queue__ << args
  return if @__running_steps__
  @__running_steps__ = true
  EventMachine.next_tick { __run_next_step__ }
end
__run_next_step__() click to toggle source
# File lib/rspec/eventmachine/async_steps.rb, line 32
def __run_next_step__
  step = @__step_queue__.shift
  return EventMachine.stop unless step
  
  method_name, args = step.shift, step
  begin
    method(method_name).call(*args) { __run_next_step__ }
  rescue Object
    __end_steps__
    raise
  end
end
teardown_mocks_for_rspec() click to toggle source
Calls superclass method
# File lib/rspec/eventmachine/async_steps.rb, line 54
def teardown_mocks_for_rspec
  EventMachine.reactor_running? ? false : super
end
verify_mocks_for_rspec() click to toggle source
Calls superclass method
# File lib/rspec/eventmachine/async_steps.rb, line 50
def verify_mocks_for_rspec
  EventMachine.reactor_running? ? false : super
end