2010-05-23 4 views
6

मैं रेल 2.3.5 का उपयोग कर रहा हूं। स्पेक ठीक काम करता है।रेक कार्य के माध्यम से -f specdoc विकल्प को कैसे पास करें

यह spec --help से है।

spec --help 

-f, --format FORMAT[:WHERE]  Specifies what format to use for output. Specify WHERE to tell 
            the formatter where to write the output. All built-in formats 
            expect WHERE to be a file name, and will write to $stdout if it's 
            not specified. The --format option may be specified several times 
            if you want several outputs 

            Builtin formats: 
            silent|l     : No output 
            progress|p    : Text-based progress bar 
            profile|o    : Text-based progress bar with profiling of 10 slowest examples 
            specdoc|s    : Code example doc strings 
            nested|n     : Code example doc strings with nested groups indented 
            html|h     : A nice HTML report 
            failing_examples|e  : Write all failing examples - input for --example 

           failing_example_groups|g : Write all failing example groups - input for --example 

मैं रेक कार्य के माध्यम से specdoc कैसे पास करूं?

उत्तर

8

रेलवे रूट में .rspec फ़ाइल जोड़ें या संपादित करें।

--colour 
--format documentation 

ध्यान दें कि specdoc प्रारूप के लिए नया नाम RSpec 2.1 में प्रलेखन है: उदाहरण के लिए, मेरा अब इन विकल्पों में शामिल है।

7

रेक स्पेक SPEC_OPTS पर्यावरण चर का सम्मान करेगा।

rake spec SPEC_OPTS="--format specdoc" 
संबंधित मुद्दे