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.
149 150 151 152 |
# File 'lib/minitest/queue.rb', line 149 def initialize(runnable, method_name) @runnable = runnable @method_name = method_name end |
Instance Method Details
#<=>(other) ⇒ Object
158 159 160 |
# File 'lib/minitest/queue.rb', line 158 def <=>(other) id <=> other.id end |
#flaky? ⇒ Boolean
166 167 168 |
# File 'lib/minitest/queue.rb', line 166 def flaky? Minitest.queue.flaky?(self) end |
#id ⇒ Object
154 155 156 |
# File 'lib/minitest/queue.rb', line 154 def id @id ||= "#{@runnable}##{@method_name}" end |
#run ⇒ Object
162 163 164 |
# File 'lib/minitest/queue.rb', line 162 def run Minitest.run_one_method(@runnable, @method_name) end |