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.



100
101
102
103
# File 'lib/minitest/queue.rb', line 100

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

Instance Method Details

#<=>(other) ⇒ Object



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

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

#flaky?Boolean

Returns:

  • (Boolean)


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

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

#idObject



105
106
107
# File 'lib/minitest/queue.rb', line 105

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

#runObject



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

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