Skip to content
Permalink
Browse files

Merge pull request #524 from davidsch/invoke_untranslated

Update spec runner to work with invoke's boolean flags
  • Loading branch information
alex committed Mar 18, 2013
2 parents 7140ca0 + bc867ec commit 9b39c7dd61e534176d3330ba025b3a8576e66d34
Showing with 5 additions and 5 deletions.
  1. +1 −1 docs/contributing.rst
  2. +4 −4 tasks/specs.py
@@ -89,7 +89,7 @@ If you implemented a new feature, and want to untag the specs that now pass::
And finally, during development, you may find it useful to run the
specs untranslated::

$ invoke specs.run --translated=False --files=../rubyspec/core/array/new_spec.rb
$ invoke specs.run --untranslated --files=../rubyspec/core/array/new_spec.rb

Adding yourself to the authors file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -4,9 +4,9 @@


class Rubyspecs(BaseTest):
def __init__(self, files, options, translated=True):
def __init__(self, files, options, untranslated=False):
super(Rubyspecs, self).__init__()
self.exe = "`pwd`/bin/%s" % ("topaz" if translated else "topaz_untranslated.py")
self.exe = "`pwd`/bin/%s" % ("topaz_untranslated.py" if untranslated else "topaz")
self.files = files
self.options = options
self.download_mspec()
@@ -26,8 +26,8 @@ def untag(self):


def generate_spectask(taskname):
def spectask(files="", options="", translated=True):
runner = Rubyspecs(files, options, translated=(translated != "False"))
def spectask(files="", options="", untranslated=False):
runner = Rubyspecs(files, options, untranslated=untranslated)
getattr(runner, taskname)()
spectask.__name__ = taskname
return task(spectask)

0 comments on commit 9b39c7d

Please sign in to comment.