Module: Minitest::Data::Test
- Defined in:
- lib/minitest/data.rb
Defined Under Namespace
Modules: ClassMethods
Instance Attribute Summary collapse
-
#data_attribute ⇒ Object
Returns the value of attribute data_attribute.
-
#data_label ⇒ Object
Returns the value of attribute data_label.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#data_attribute ⇒ Object
Returns the value of attribute data_attribute.
63 64 65 |
# File 'lib/minitest/data.rb', line 63 def data_attribute @data_attribute end |
#data_label ⇒ Object
Returns the value of attribute data_label.
63 64 65 |
# File 'lib/minitest/data.rb', line 63 def data_label @data_label end |
Class Method Details
.prepended(klass) ⇒ Object
8 9 10 |
# File 'lib/minitest/data.rb', line 8 def prepended(klass) klass.extend(ClassMethods) end |
Instance Method Details
#run ⇒ Object
65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/minitest/data.rb', line 65 def run time_it do capture_exceptions do Minitest::Test::SETUP_METHODS.each do |hook| self.send hook end if data_attribute self.send self.name, data_attribute else self.send self.name end end Minitest::Test::TEARDOWN_METHODS.each do |hook| capture_exceptions do self.send hook end end end Minitest::Result.from self end |