Module: EM
- Defined in:
- lib/em/spec_helpers.rb
Class Method Summary collapse
Class Method Details
.run_all_ticks ⇒ Object
9 10 11 |
# File 'lib/em/spec_helpers.rb', line 9 def self.run_all_ticks EM::run{ stop_after_all_ticks } end |
.stop_after_all_ticks ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/em/spec_helpers.rb', line 13 def self.stop_after_all_ticks if @next_tick_queue && !@next_tick_queue.empty? EM::next_tick{ stop_after_all_ticks } else EM::stop end end |
.with_all_ticks ⇒ Object
2 3 4 5 6 7 |
# File 'lib/em/spec_helpers.rb', line 2 def self.with_all_ticks EM::run do yield stop_after_all_ticks end end |