Class: MiniTest::Spec

Inherits:
Object
  • Object
show all
Defined in:
lib/minitest-spec.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Attribute Details

#subjectObject

Returns the value of attribute subject.



5
6
7
# File 'lib/minitest-spec.rb', line 5

def subject
  @subject
end

Class Method Details

.its(msg, &block) ⇒ Object



10
11
12
13
14
# File 'lib/minitest-spec.rb', line 10

def its msg, &block
  it msg.to_s do
    subject.send(msg).instance_eval &block
  end
end

.shared_examplesObject



16
17
18
# File 'lib/minitest-spec.rb', line 16

def shared_examples
  @shared_examples ||= {}
end