Class: LeakCheckerAction

Inherits:
Object show all
Defined in:
lib/mspec/runner/actions/leakchecker.rb

Instance Method Summary collapse

Instance Method Details

#after(state) ⇒ Object


285
286
287
288
289
290
291
# File 'lib/mspec/runner/actions/leakchecker.rb', line 285

def after(state)
  unless @checker.check(state.description)
    if state.example
      puts state.example.source_location.join(':')
    end
  end
end

#registerObject


276
277
278
279
# File 'lib/mspec/runner/actions/leakchecker.rb', line 276

def register
  MSpec.register :start, self
  MSpec.register :after, self
end

#startObject


281
282
283
# File 'lib/mspec/runner/actions/leakchecker.rb', line 281

def start
  @checker = LeakChecker.new
end