<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>QUnit Example</title>
    <link rel="stylesheet" href="./lib/qunit-1.10.0.css">
    <script src="../../dist/yadda-0.8.5.js"></script>
    <script src="./lib/qunit-1.10.0.js"></script>
    <script src="./bottles-library.js"></script>
    <script type="text/javascript">
        var Yadda = require('yadda');
        var FeatureParser = Yadda.parsers.FeatureParser;

        function runTests() {
            var text = document.getElementById('scenarios').innerText;
            var scenarios = new FeatureParser().parse(text).scenarios;
            for (var i = 0; i < scenarios.length; i++) {
                var scenario = scenarios[i];
                test(scenario.title, function() {
                    new Yadda.Yadda(library).yadda(scenario.steps);
                });
            };
        };
    </script>
</head>
<body onLoad="runTests()">
  <div id="qunit"></div>
  <pre id="scenarios">
    Scenario: A bottle falls from the wall

        Given 100 green bottles are standing on the wall
        when 1 green bottle accidentally falls
        then there are 99 green bottles standing on the wall

    Scenario: No bottles are left

        Given 1 green bottles are standing on the wall
        when 1 green bottle accidentally falls
        then there are 0 green bottles standing on the wall
  </pre>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>QUnit Example</title>
    <link rel="stylesheet" href="./lib/qunit-1.10.0.css">
    <script src="../../dist/yadda-0.8.5.js"></script>
    <script src="./lib/qunit-1.10.0.js"></script>
    <script src="./bottles-library.js"></script>
    <script type="text/javascript">
        var Yadda = require('yadda');
        var FeatureParser = Yadda.parsers.FeatureParser;

        function runTests() {
            var text = document.getElementById('scenarios').innerText;
            var scenarios = new FeatureParser().parse(text).scenarios;
            for (var i = 0; i < scenarios.length; i++) {
                var scenario = scenarios[i];
                test(scenario.title, buildTest(scenario));

                function buildTest(scenario) {
                    return function() {
                        new Yadda.Yadda(library).yadda(scenario.steps);
                    }
                };
            };
        };
    </script>
</head>
<body onLoad="runTests()">
  <div id="qunit"></div>
  <pre id="scenarios">
    Scenario: A bottle falls from the wall

        Given 100 green bottles are standing on the wall
        when 1 green bottle accidentally falls
        then there are 99 green bottles standing on the wall

    Scenario: No bottles are left

        Given 1 green bottles are standing on the wall
        when 1 green bottle accidentally falls
        then there are 0 green bottles standing on the wall
  </pre>
</body>
</html>
Fix problem that caused only last scenario to run
Fix problem that caused only last scenario to run
