Fix preexisting tests after adding default hooks
This commit is contained in:
parent
386b0be53d
commit
b646ae53f6
@ -59,8 +59,9 @@ module Guard
|
||||
# fire it if his work leads to a system failure
|
||||
def supervised_task(guard, task_to_supervise, *args)
|
||||
guard.hook "#{task_to_supervise.to_s}_begin"
|
||||
guard.send(task_to_supervise, *args)
|
||||
result = guard.send(task_to_supervise, *args)
|
||||
guard.hook "#{task_to_supervise.to_s}_end"
|
||||
result
|
||||
rescue Exception
|
||||
UI.error("#{guard.class.name} guard failed to achieve its <#{task_to_supervise.to_s}> command: #{$!}")
|
||||
::Guard.guards.delete guard
|
||||
|
@ -1,5 +1,6 @@
|
||||
module Guard
|
||||
class Guard
|
||||
include Hook
|
||||
|
||||
attr_accessor :watchers, :options
|
||||
|
||||
|
@ -107,6 +107,8 @@ describe Guard do
|
||||
failing_result.message.should == 'I break your system'
|
||||
end
|
||||
end
|
||||
|
||||
it "calls the default hooks"
|
||||
end
|
||||
|
||||
describe ".locate_guard" do
|
||||
|
Loading…
Reference in New Issue
Block a user