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.



49
50
51
52
# File 'lib/minitest/queue.rb', line 49

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

Instance Method Details

#<=>(other) ⇒ Object



58
59
60
# File 'lib/minitest/queue.rb', line 58

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

#id ⇒ Object



54
55
56
# File 'lib/minitest/queue.rb', line 54

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

#run ⇒ Object



62
63
64
# File 'lib/minitest/queue.rb', line 62

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