# -*- coding: utf-8 -*-
"""
noselettuce.plugin
~~~~~~~~~~~~~~~~~~

Nose plugin implementation.

:copyright: 2010, Pascal Hartig <phartig@rdrei.net>
:license: BSD, see LICENSE for more details.
"""

from nose.plugins import Plugin
import lettuce


class LettucePlugin(Plugin):
    """Issues the lettuce runner in addition to the default test runner."""

    def prepareTestRunner(self):
        """Create and run the lettuce runner."""

        # These values should be configurable.
        base_path = "."
        verbosity = 4

        runner = lettuce.Runner(base_path, verbosity=verbosity)
        return runner

@@ -238,16 +238,26 @@
 lettuce%0A
+import os%0A
 %0A%0Aclass 
@@ -364,189 +364,1292 @@
     
-def prepareTestRunner(self):%0A        %22%22%22Create and run the lettuce runner.%22%22%22%0A%0A        # These values should be configurable.%0A        base_path = %22.%22%0A        verbosity = 4%0A%0A        
+name = %22lettuce%22%0A    score = 100%0A%0A    def options(self, parser, env):%0A        %22%22%22Add plugin specific options.%22%22%22%0A%0A        parser.add_option('--lettuce-path',%0A                          help=(%22Set the base path for feature discovery. %22%0A                                %22Default: ./features%22),%0A                          dest='lettuce_path')%0A%0A        parser.add_option('--lettuce-verbosity',%0A                          default=4,%0A                          help=%22Set the verbosity for the lettuce runner.%22,%0A                          dest='lettuce_verbosity')%0A%0A        parser.add_option('--scenarios',%0A                          help=%22Comma seperated list of scenarios to run.%22,%0A                          dest=%22lettuce_scenarios%22)%0A%0A        Plugin.options(self, parser, env)%0A%0A    def configure(self, options, conf):%0A        %22%22%22Set the configuration%22%22%22%0A%0A        if options.lettuce_path:%0A            self._base_path = options.lettuce_path%0A        else:%0A            self._base_path = os.path.join(self.conf.workingDir, %22features%22)%0A%0A        conf.lettuce_verbosity = options.lettuce_verbosity%0A        conf.lettuce_scenarios = options.lettuce_scenarios%0A        Plugin.configure(self, options, conf)%0A%0A    def prepareTestRunner(self, runner):%0A        %22%22%22Create and run the lettuce runner.%22%22%22%0A%0A        l
 runn
@@ -1668,16 +1668,22 @@
 .Runner(
+self._
 base_pat
@@ -1688,29 +1688,175 @@
 ath,
- verbosity=verbosity)
+%0A                                 verbosity=self.conf.lettuce_verbosity,%0A                                 scenarios=self.conf.lettuce_scenarios)%0A        lrunner.run()%0A
 %0A   

The runner runs