Class: Minitest::Test

Inherits:
Runnable
  • Object
show all
Defined in:
lib/minitest/minitest_ext.rb

Class Method Summary collapse

Class Method Details

.example(desc, &block) ⇒ Object


12
13
14
15
16
17
# File 'lib/minitest/minitest_ext.rb', line 12

def example(desc, &block)
  it desc do
    self.class.[:example_name] = desc
    self.instance_eval(&block)
  end
end

.meta(key, value) ⇒ Object


19
20
21
# File 'lib/minitest/minitest_ext.rb', line 19

def meta(key, value)
  self.[key] = value
end

.metadataObject


4
5
6
# File 'lib/minitest/minitest_ext.rb', line 4

def 
  @metadata ||= {}
end

.param(name, description, options = {}) ⇒ Object


23
24
25
# File 'lib/minitest/minitest_ext.rb', line 23

def param(name, description, options={})
  self.params << {:name => name, :description => description}.merge(options)
end

.paramsObject


8
9
10
# File 'lib/minitest/minitest_ext.rb', line 8

def params
  @params ||= []
end