Module: MiniTest::Spec::SharedExamples
- Defined in:
- lib/minitest-spec/shared_example.rb
Instance Method Summary collapse
Instance Method Details
#it_behaves_like(desc) ⇒ Object
6 7 8 9 10 |
# File 'lib/minitest-spec/shared_example.rb', line 6 def it_behaves_like(desc) self.instance_eval do MiniTest::Spec.shared_examples[desc].call end end |
#shared_examples_for(desc, &block) ⇒ Object
2 3 4 |
# File 'lib/minitest-spec/shared_example.rb', line 2 def shared_examples_for(desc, &block) MiniTest::Spec.shared_examples[desc] = block end |