Wrote more tests, fixed another nasty bug

This commit is contained in:
Mike Dvorkin
2010-08-14 22:13:09 -07:00
parent f8ba6a911b
commit 1753a4810a
6 changed files with 43 additions and 29 deletions

View File

@@ -1,21 +1,24 @@
module Pit
module Task
def should_do_cascading_delete
def should_do_cascading_task_delete
`#{@pit} project -c project`
5.times do |t|
12.times do |t|
`#{@pit} task -c task#{t}`
5.times do |n|
`#{@pit} task`.should.match /\* #{t+1}:/m
12.times do |n|
`#{@pit} note -c task#{t}_note#{n}`
`#{@pit} note`.should.match /\* #{t*12 + n+1}:/m
end
end
`#{@pit} task`.should.match /\* 5:/m
`#{@pit} task`.should.match /\* 12:/m
`#{@pit} note -e 21 hello21`
`#{@pit} note -d 21`
`#{@pit} note -e 22 hello22`
`#{@pit} note -d 22`
`#{@pit} task -d`
`#{@pit} task`.should_not.match /[\s|\*] 5:/m
`#{@pit} task`.should_not.match /[\s|\*] 12:/m
end
end
end