Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Adding shortcuts for classic bdd style

  • Loading branch information...
commit f4ae494acf38ba55df419c6c00062941a914665f 1 parent ac91d0d
authored December 25, 2012
21  examples/classic/classic-steps.js
... ...
@@ -0,0 +1,21 @@
  1
+var steps = new Steps()
  2
+
  3
+.given("that I like repetitive, mechanical test specifications", function() {
  4
+	document.write("<li>Yawn</li>");
  5
+})
  6
+
  7
+.when("I use given, when, or then instead of addStep", function() {
  8
+	document.write("<li>Stretch</li>");
  9
+})
  10
+
  11
+.then("anyone reading the specification will fall asleep", function() {
  12
+	document.write("<li>Zzzzz</li>");
  13
+})
  14
+
  15
+.then("probably fall off their chair", function() {
  16
+	document.write("<li>Bump</li>");
  17
+})
  18
+
  19
+.then("not wake up", function() {
  20
+	document.write("<li>Snore</li>");
  21
+});
19  examples/classic/test.html
... ...
@@ -0,0 +1,19 @@
  1
+<html>
  2
+	<head>
  3
+		<script src="../../src/js/yadda.js"></script>
  4
+		<script src="./classic-steps.js"></script>
  5
+		<script type="text/javascript">
  6
+
  7
+new Yadda(steps).yadda().yadda().yadda([
  8
+	"Given that I like repetitive, mechanical test specifications",
  9
+	"When I use given, when, or then instead of addStep",
  10
+	"Then anyone reading the specification will fall asleep",
  11
+	"And probably fall off their chair",
  12
+	"But not wake up"
  13
+]);
  14
+		</script>
  15
+	</head>
  16
+	<body>
  17
+				
  18
+	</body>
  19
+</html>

0 notes on commit f4ae494

Please sign in to comment.
Something went wrong with that request. Please try again.