Class: Minitest::Queue::SingleExample

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest/queue.rb

Instance Method Summary collapse

Constructor Details

#initialize(runnable, method_name) ⇒ SingleExample

Returns a new instance of SingleExample.



149
150
151
152
# File 'lib/minitest/queue.rb', line 149

def initialize(runnable, method_name)
  @runnable = runnable
  @method_name = method_name
end

Instance Method Details

#<=>(other) ⇒ Object



158
159
160
# File 'lib/minitest/queue.rb', line 158

def <=>(other)
  id <=> other.id
end

#flaky?Boolean

Returns:

  • (Boolean)


166
167
168
# File 'lib/minitest/queue.rb', line 166

def flaky?
  Minitest.queue.flaky?(self)
end

#idObject



154
155
156
# File 'lib/minitest/queue.rb', line 154

def id
  @id ||= "#{@runnable}##{@method_name}"
end

#runObject



162
163
164
# File 'lib/minitest/queue.rb', line 162

def run
  Minitest.run_one_method(@runnable, @method_name)
end