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.
106 107 108 109 |
# File 'lib/minitest/queue.rb', line 106 def initialize(runnable, method_name) @runnable = runnable @method_name = method_name end |
Instance Method Details
#<=>(other) ⇒ Object
115 116 117 |
# File 'lib/minitest/queue.rb', line 115 def <=>(other) id <=> other.id end |
#flaky? ⇒ Boolean
123 124 125 |
# File 'lib/minitest/queue.rb', line 123 def flaky? Minitest.queue.flaky?(self) end |
#id ⇒ Object
111 112 113 |
# File 'lib/minitest/queue.rb', line 111 def id @id ||= "#{@runnable}##{@method_name}" end |
#run ⇒ Object
119 120 121 |
# File 'lib/minitest/queue.rb', line 119 def run Minitest.run_one_method(@runnable, @method_name) end |