Module: NanDoc::SpecDoc::MiniTest::SpecInstanceMethods

Defined in:
lib/nandoc/spec-doc/mini-test.rb

Overview

These are the methods that will be available to nandoc-enhanced tests. For now it is recommended to leave this as just the one method nandoc(), which will return the TestCaseAgent.

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.include_to(mod) ⇒ Object



91
92
93
94
95
96
97
98
99
# File 'lib/nandoc/spec-doc/mini-test.rb', line 91

def include_to mod
  unless mod.ancestors.include?(::MiniTest::Spec)
    fail(
     "Sorry, for now SpecDoc can only extend MiniTest::Spec "<<
     " tests.  Couldn't extend #{mod}."
    )
  end
  mod.send(:include, self)
end

Instance Method Details

#nandocObject



101
102
103
# File 'lib/nandoc/spec-doc/mini-test.rb', line 101

def nandoc
  @nandoc_agent ||= ::NanDoc::SpecDoc::TestCaseAgent.new(self)
end