Module: EM::MiniTest::Spec::ClassMethods

Defined in:
lib/em/minitest/spec.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#it(*args, &block) ⇒ Object

:nodoc:



79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/em/minitest/spec.rb', line 79

def it *args, &block # :nodoc:
  return super unless block_given?

  super do
    @wait = false

    EM.run do
      @timeout = EM.add_timer(0.1) do
        flunk "test timed out!"
      end

      instance_eval(&block)
      done! unless @wait
    end
  end
end