Module: MiniTest::Spec::SharedExamples

Defined in:
lib/install/test/support/shared_examples.rb

Instance Method Summary collapse

Instance Method Details

#include_examples(desc) ⇒ Object



19
20
21
# File 'lib/install/test/support/shared_examples.rb', line 19

def include_examples(desc)
  instance_eval(&MiniTest::Spec.shared_examples[desc])
end

#shared_examples(desc, &block) ⇒ Object



15
16
17
# File 'lib/install/test/support/shared_examples.rb', line 15

def shared_examples(desc, &block)
  MiniTest::Spec.shared_examples[desc] = block
end

#shared_examples_for(desc, &block) ⇒ Object



11
12
13
# File 'lib/install/test/support/shared_examples.rb', line 11

def shared_examples_for(desc, &block)
  MiniTest::Spec.shared_examples[desc] = block
end