lib/cucumber/js_support/js_dsl.js in cucumber-0.7.2 vs lib/cucumber/js_support/js_dsl.js in cucumber-0.7.3
- old
+ new
@@ -10,31 +10,30 @@
registerTransform: function(regexp, func){
jsLanguage.registerJsTransform(regexp, func);
},
- beforeHook: function(tag_or_func, func){
- CucumberJsDsl.__registerJsHook('before', tag_or_func, func);
+ beforeHook: function(tag_expressions_or_func, func){
+ CucumberJsDsl.__registerJsHook('before', tag_expressions_or_func, func);
},
- afterHook: function(tag_or_func, func){
- CucumberJsDsl.__registerJsHook('after', tag_or_func, func);
+ afterHook: function(tag_expressions_or_func, func){
+ CucumberJsDsl.__registerJsHook('after', tag_expressions_or_func, func);
},
Table: function(raw_table){
this.raw = raw_table;
},
- __registerJsHook: function(label, tag_or_func, func){
+ __registerJsHook: function(label, tag_expressions_or_func, func){
if(func != null){
var hook_func = func;
- var tag = tag_or_func;
+ var tag_expressions = tag_expressions_or_func;
+ } else {
+ var hook_func = tag_expressions_or_func;
+ var tag_expressions = [];
}
- else{
- var hook_func = tag_or_func;
- var tag = null;
- }
- jsLanguage.registerJsHook(label, hook_func, tag);
+ jsLanguage.registerJsHook(label, tag_expressions, hook_func);
}
}
CucumberJsDsl.Table.prototype.hashes = function(){
var rows = this.rows();
\ No newline at end of file