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.



107
108
109
110
# File 'lib/minitest/queue.rb', line 107

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

Instance Method Details

#<=>(other) ⇒ Object



116
117
118
# File 'lib/minitest/queue.rb', line 116

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

#flaky? ⇒ Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/minitest/queue.rb', line 124

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

#id ⇒ Object



112
113
114
# File 'lib/minitest/queue.rb', line 112

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

#run ⇒ Object



120
121
122
# File 'lib/minitest/queue.rb', line 120

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