"""
hurry.raphael basic tests
========================

Here are some basic tests for hurry.raphael.

Let's set up a way to render URLs; typically the framework has already
done this::

  >>> def get_library_url(library):
  ...    return 'http://localhost/static/%s' % (library.name)
  >>> from hurry.resource import Library
  >>> from hurry.resource.interfaces import ILibraryUrl
  >>> from zope import component
  >>> # register the ILibraryUrl adaptation for the tests.
  >>> component.provideAdapter(
  ...     factory=get_library_url, adapts=(Library,), provides=ILibraryUrl)

Render the inclusion::

  >>> from hurry.resource import NeededInclusions
  >>> from hurry.jqplot import base, css
  >>> needed = NeededInclusions()
  >>> needed.need(base)
  >>> needed.need(css)
  >>> print needed.render()
  <link rel="stylesheet" type="text/css" href="http://localhost/static/jqplot/jquery.jqplot.css" />
  <script type="text/javascript" src="http://localhost/static/jqplot/jquery.jqplot.js"></script>

  >>> from hurry.jqplot import barRenderer
  >>> needed = NeededInclusions()
  >>> needed.need(barRenderer)
  >>> print needed.render()
  <script type="text/javascript" src="http://localhost/static/jqplot/jquery.jqplot.js"></script>
  <script type="text/javascript" src="http://localhost/static/jqplot/plugins/jqplot.barRenderer.js"></script>

  >>> needed.mode('minified')
  >>> print needed.render()
  <script type="text/javascript" src="http://localhost/static/jqplot/jquery.jqplot.min.js"></script>
  <script type="text/javascript" src="http://localhost/static/jqplot/plugins/jqplot.barRenderer.min.js"></script>

"""
