webrat/lib/webrat/selenium/selenium_extensions.js

6 lines
182 B
JavaScript

PatternMatcher.strategies['evalregex'] = function(regexpString) {
this.regexp = eval(regexpString);
this.matches = function(actual) {
return this.regexp.test(actual);
};
};