Class: Minitest::Queue::SingleExample
- Inherits:
-
Object
- Object
- Minitest::Queue::SingleExample
- Defined in:
- lib/minitest/queue.rb
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #id ⇒ Object
-
#initialize(runnable, method_name) ⇒ SingleExample
constructor
A new instance of SingleExample.
- #run ⇒ Object
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 |