Permalink
Browse files

gave 'given' h4 tag instead of sharing h3 with context

  • Loading branch information...
1 parent 05eb5e2 commit 6b379ecfc6318e8adaeb60913caea77d0e0035d0 @hojberg hojberg committed Nov 3, 2009
Showing with 14 additions and 1 deletion.
  1. +14 −1 riot.js
View
15 riot.js
@@ -178,6 +178,10 @@ Riot.Formatters = {
display('<h3>' + name + '</h3>');
};
+ this.given = function(name) {
+ display('<h4>' + name + '</h4>');
+ };
+
this.separator = function() {
display('<hr />');
};
@@ -209,6 +213,10 @@ Riot.Formatters = {
this.line(name);
};
+ this.given = function(name) {
+ this.line(name);
+ };
+
this.separator = function() {
this.line('');
};
@@ -261,7 +269,12 @@ Riot.Context.prototype = {
},
run: function() {
- Riot.formatter.context(this.name);
+ if (this.name.match(/Given/)) {
+ Riot.formatter.given(this.name);
+ }
+ else {
+ Riot.formatter.context(this.name);
+ }
Riot.withDSL(this.callback, this)();
this.runSetup();
for (var i = 0; i < this.assertions.length; i++) {

0 comments on commit 6b379ec

Please sign in to comment.