rva - Added a 'should_match' regex matcher
This commit is contained in:
@@ -200,6 +200,11 @@ Jasmine.Matchers.method('should_not_equal', function (expected) {
|
||||
'Expected ' + expected + ' to not equal ' + this.actual + ', but it does.');
|
||||
});
|
||||
|
||||
Jasmine.Matchers.method('should_match', function (reg_exp) {
|
||||
return this.report((reg_exp.match(this.actual)),
|
||||
'Expected ' + this.actual + ' to match ' + reg_exp + '.');
|
||||
});
|
||||
|
||||
/*
|
||||
* Jasmine spec constructor
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user