Not sure we need to make this change right this instant, but at some point I
think we should reorganize masterview''s test directory structure into a
more
general form, following the structure in a rails app (and fairly standard
elsewhere, I think):
masterview
...examples, generators, lib, tasks directories...
test
fixtures - test fixtures here (template docs created for test
cases...)
unit - move all our unit test classes here
test_helper.rb - helpers go at the main test dir
And tweak the rakefile to differentiate :test_units (run all the unit
tests), and general :test, which right now would just run the unit tests but
in the future might have other flavors of tests to run.
If you like this, I can go ahead and do it now while I''m making a pass
over
everything so the new config mechanism works properly.
~ Deb
Done. Mostly just needed code import refs adjusted for the dir level
change.
test
fixtures
--tmp directory used for execution is on svn:ignore of main test dir
unit - all the *_test.rb unit tests
Rakefile tasks:
- test:units - run all the unit tests
- test - run all tests (currently only unit tests exist)
One "philosphical" modification: I pulled over copies of
examples/product.html and examples/test.import into test/fixtures.
Rationale: test cases shouldn''t be depend on examples being published
for
users - test fixtures should be specific to what we;''re trying to test,
shouldn''t inadvertantly break tests just because at some point in
future we
change the examples for other reasons.
Test cases using these fixtures are: run_parser_test, template_file_watcher,
template_spec_test
[i''ll back out if you disagree; don''t like duplication of that
file, but
maybe we just need a stripped-down variation as the test fixture anyway -
whatever, your call]
Maybe one other change to consider: after working with all these tests, I
thought it would have been mildly helpful if naming convention of the files
differentiated tests focused strictly on the built-in directives from more
general tests, e.g., directive_XXX_test.rb. Not a big deal, but I''ll
make
that change if you think it would be helpful.
~ Deb