Skip to content

Commit

Permalink
git-svn-id: http://jsspec.googlecode.com/svn/trunk@71 92187c49-0d35-0…
Browse files Browse the repository at this point in the history
…410-b305-2f54cc65526e
  • Loading branch information
jania902 committed Aug 2, 2007
1 parent 3cea589 commit d16f7a1
Showing 1 changed file with 19 additions and 18 deletions.
37 changes: 19 additions & 18 deletions demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,6 @@
}
})

describe('Failure messages', {
'Should be (String)': function() {
expect("Hello World").should_be("Good-bye world");
},
'Should have (Object\s item)': function() {
expect({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(3, "accounts");
},
'Should have at least': function() {
expect([1,2,3]).should_have_at_least(4, "items");
},
'Should include': function() {
expect([1,2,3]).should_include(4);
},
'Should match': function() {
expect("Hello").should_match(/bye/);
}
})

describe('"Should match"s', {
'Should match': function() {
expect("Hello").should_match(/ell/);
Expand Down Expand Up @@ -100,6 +82,25 @@
expect({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(0, "accounts");
}
})

describe('Failure messages', {
'Should be (String)': function() {
expect("Hello World").should_be("Good-bye world");
},
'Should have (Object\s item)': function() {
expect({name:'Alan Kang', email:'jania902@gmail.com', accounts:['A', 'B']}).should_have(3, "accounts");
},
'Should have at least': function() {
expect([1,2,3]).should_have_at_least(4, "items");
},
'Should include': function() {
expect([1,2,3]).should_include(4);
},
'Should match': function() {
expect("Hello").should_match(/bye/);
}
})

describe('"Should be"s', {
'String mismatch': function() {
expect("Hello world").should_be("Good-bye world");
Expand Down

0 comments on commit d16f7a1

Please sign in to comment.