MarkdownT

Undocumented in source.

Members

Functions

issue
void issue(const(Descriptor) descriptor, string fmt, string comment_fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
issue
void issue(const(I) info, string fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
issue
void issue(const(Group) group, string fmt)
Undocumented in source. Be warned that the author may not have intended to support it.
issue
void issue(const(ScenarioGroup) scenario_group)
Undocumented in source. Be warned that the author may not have intended to support it.
issue
void issue(const(FeatureGroup) feature_group)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

master
MarkdownFMT master;
Undocumented in source.

Variables

bout
Stream bout;
Undocumented in source.

Examples

Examples: Converting a Scenario to Markdown

// Markdown scenario test
   auto bout = new OutBuffer;
   auto markdown = Markdown(bout);
   alias unit_mangle = mangleFunc!(MarkdownU);
   auto awesome = new Some_awesome_feature;
   const scenario_result = run(awesome);
   {
       scope (exit) {
           bout.clear;
       }
       enum filename = unit_mangle("descriptor")
               .setExtension(FileExtension.markdown);
       enum expected = import(filename);
       //io.writefln("scenario_result.given.infos %s", scenario_result.given.infos);
       markdown.issue(scenario_result.given.infos[0], markdown.master.property);
       version (behaviour_unitdata)
           filename.unitfile.setExtension("mdtest").fwrite(bout.toString);
       assert(bout.toString == expected);
   }
   {
       scope (exit) {
           bout.clear;
       }
       enum filename = unit_mangle("scenario")
               .setExtension(FileExtension.markdown);
       markdown.issue(scenario_result);
       version (behaviour_unitdata)
           filename.unitfile.setExtension("mdtest").fwrite(bout.toString);

       enum expected = import(filename);
       assert(bout.toString == expected);
   }

Examples: Convering a FeatureGroup to Markdown

auto bout = new OutBuffer;
auto markdown = Markdown(bout);
alias unit_mangle = mangleFunc!(MarkdownU);
const feature_group = getFeature!(tagion.behaviour.BehaviourUnittest);
{
    scope (exit) {
        bout.clear;
    }
    enum filename = unit_mangle("feature")
            .setExtension(FileExtension.markdown);
    markdown.issue(feature_group);
    version (behaviour_unitdata)
        filename.unitfile.setExtension("mdtest").fwrite(bout.toString);

    immutable expected = import(filename);
    assert(bout.toString == expected);
}

Meta