mirror of
https://github.com/michaeldv/pit.git
synced 2025-12-10 16:35:35 +00:00
Wrote more tests, fixed another nasty bug
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user