Class: Minitest::Queue::SingleExample
- Inherits:
-
Object
- Object
- Minitest::Queue::SingleExample
- Defined in:
- lib/minitest/queue.rb
Instance Method Summary collapse
- #<=>(other) ⇒ Object
- #flaky? ⇒ Boolean
- #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.
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
117 118 119 |
# File 'lib/minitest/queue.rb', line 117 def flaky? Minitest.queue.flaky?(self) end |
#id ⇒ Object
105 106 107 |
# File 'lib/minitest/queue.rb', line 105 def id @id ||= "#{@runnable}##{@method_name}" end |
#run ⇒ Object
113 114 115 |
# File 'lib/minitest/queue.rb', line 113 def run Minitest.run_one_method(@runnable, @method_name) end |