# -*- coding: utf-8 -*-

import sys
import imp

from mamba import formatters
from mamba.runner import Runner


def main():
    formatter = formatters.DocumentationFormatter()
    runner = Runner(formatter)

    for file_ in sys.argv[1:]:
        module = imp.load_source(file_.replace('.py', ''), file_)
        runner.run(module)

    formatter.format_summary()

    if runner.has_failed_specs:
        sys.exit(1)


if __name__ == '__main__':
    main()

@@ -29,16 +29,26 @@
 ort sys%0A
+import os%0A
 import i
@@ -50,16 +50,16 @@
 ort imp%0A
-
 %0Afrom ma
@@ -231,20 +231,16 @@
  in 
-sys.argv%5B1:%5D
+_specs()
 :%0A  
@@ -395,16 +395,16 @@
 _specs:%0A
-
         
@@ -417,16 +417,327 @@
 it(1)%0A%0A%0A
+def _specs():%0A    if len(sys.argv) == 1:%0A        collected = %5B%5D%0A        for root, dirs, files in os.walk('spec'):%0A            collected.extend(%5Bos.path.join(root, file_) for file_ in files if file_.endswith('_spec.py')%5D)%0A        collected.sort()%0A        return collected%0A    else:%0A        return sys.argv%5B1:%5D%0A%0A%0A
 if __nam

Load specs from spec/**/*_spec.py if no spec was specified