Commit Graph

13 Commits

Author SHA1 Message Date
Ian Kronquist f5c4c4c861 (PDOC-21) Test for duplicate hostclass warnings
* Add testing file based off shaigy's tests.
* Refactor using_module into a helper class.
* Expect that the warnings printed to stdout are *exactly* what I want to see
  and nothing else.
2015-08-19 10:50:03 -07:00
Ian Kronquist 457ec86a2b (PDOC-35) Test strings works with nested classes 2015-07-28 14:56:14 -07:00
Ian Kronquist 168c1c4b53 (PDOC-37) Override Yard logger on a per test basis
Override Yard logger on a per test basis, not globally.
Replace one hack with another slightly less disgusting one.
2015-07-06 16:40:30 -07:00
Hailee Kenney 917d9b6536 (maint) Remove html-matchers dependency
Prior to this commit, some of the unit tests for strings relied on
the rspec-html-matchers gem, which does not seem to get along with
rspec 3. This meant that we had to tie our tests to rspec 2 which
has become too inconvenient.

In order to remove the gem, use simple string matching instead.
Update the Gemfile so that it no longer requires the matchers and
no longer has rspec tied to 2.7.
2015-07-02 15:12:49 -07:00
Hailee Kenney aea5c9537f (PDOC-9) Switch to metadata.json for test module
Prior to this commit, the test module used in testing was using
a Modulefile rather than metadata.json. Switch to metadata.json
instead since Modulefile is deprecated and was causing a deprecation
warning during acceptance testing.
2014-10-06 10:21:58 -07:00
Hailee Kenney ee6997cd24 (PDOC-9) Add preliminary full system test
In order to help ensure that the strings module is not broken
during development, add a full system integration test which can
run at regular intervals to ensure that the module is working as
expected.

The test installs the string module as well as a test module which
contains the different types of puppet and ruby code that the strings
module can document. It then runs strings and ensures that the HTML
generated is correct.

Additionally, make some changes to the Gemfile to allow strings to
be run as a gem even if it isn't installed in the modulepath. Also
make a few changes to the unit tests to make them compatible with
the version of rspec required by Beaker.
2014-10-06 10:08:30 -07:00
Hailee Kenney 94ff0a4445 (PDOC-3) Add method headers for new libraries
Add some comments for the new methods that have been introduced
to ensure that the code is readable and well documented.
2014-09-30 13:55:10 -07:00
Hailee Kenney 58fef9e8f6 (PDOC-3) Refactor face and remove modules action
Refactor the code in the strings face and extract much of the functionality
into a separate library in order to make the code more readable and
sustainable. Additionally, remove the `modules` action from the face
since it does not have a clear use case currently. However since the `server`
action depends on it, and it may be helpful to add other features in the future,
extract the functionality previously contained in `modules` into a helper
method.
2014-09-30 13:55:10 -07:00
Hailee Kenney ebbc2936df (PDOC-3) Rename FutureParser and ParserFunctions
Prior to this commit, the handlers and code objects which dealt with
puppet functions were referred to as `FutureParserFunctions` and
`ParseFunctions`. This naming convention will not make very much
sense going forward when the future parser becomes the primary
parser. Therefor, rename `FutureParserFunctions` to `Puppet4xFunctions`
and `ParserFunctions` to `Puppet3xFunctions`.
2014-09-17 10:10:38 -07:00
Hailee Kenney ec0e26e339 (PDOC-3) Rename face to strings instead of yardoc
Since we don't want the name of the tool to reflect the fact that
it is using yard internally (this is an implementation detail), rename
the face to `strings`. Now when one wishes to generate documentation,
`puppet strings` will be used rather than `puppet yardoc`.
2014-09-11 09:57:19 -07:00
Hailee Kenney 4c303a0258 (PDOC-2) Add tests around face and HTML generation
Add tests to ensure that the face (puppet yardoc) works from end to
end. In other words, ensure that when given a module, puppet yardoc can
successfully evaluate the .pp and .rb files present in the module and
produce the expected HTML.
2014-09-05 14:10:55 -07:00
Hailee Kenney b2267fcfc6 (PDOC-5) Test host classes and 3x functions
Add tests for the remaining two Puppet-specific handlers that were
not tested in the previous commit. Specifically, add tests for the
3.x function handler and the host class handler.
2014-09-03 15:41:00 -07:00
Hailee Kenney 766fd57ebe (PDOC-5) Add spec testing for pops component
Prior to this commit there was no testing around the pops component.
Since most of the API in the pops component is private, there aren't
very many things to test, so add just a few test cases.

Additionally rename a previous spec file and make some changes to
the Gemfile.
2014-09-03 14:28:06 -07:00