diff tests/test_factory.txt @ 11:ff272dcd5cd8

we have a passing test
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 27 May 2011 07:02:27 -0700
parents
children 0bea5297c156
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test_factory.txt	Fri May 27 07:02:27 2011 -0700
@@ -0,0 +1,24 @@
+Test pyloader's Factory
+=======================
+
+Boilerplate::
+
+    >>> import os
+    >>> from pyloader.factory import PyFactory
+
+Construct a factory::
+
+    >>> factory = PyFactory()
+
+Make a configuration::
+
+    >>> config = {'': {'path': os.path.join(here, 'objects.py:stringsort'), 'args': ['foo', 'bar']}} 
+
+Load it::
+
+    >>> factory.configure(config)
+
+Get the thing::
+
+    >>> factory.load()
+    'abfoor'