Class: DebugAction

Inherits:
ActionFilter show all
Defined in:
lib/extensions/mspec/mspec/runner/actions/debug.rb

Instance Method Summary collapse

Methods inherited from ActionFilter

#===, #initialize, #load

Constructor Details

This class inherits a constructor from ActionFilter

Instance Method Details

#before(state) ⇒ Object



4
5
6
7
8
# File 'lib/extensions/mspec/mspec/runner/actions/debug.rb', line 4

def before(state)
  require 'rubygems'
  require 'ruby-debug'
  Kernel.debugger if self === state.description
end

#registerObject



10
11
12
13
# File 'lib/extensions/mspec/mspec/runner/actions/debug.rb', line 10

def register
  super
  MSpec.register :before, self
end

#unregisterObject



15
16
17
18
# File 'lib/extensions/mspec/mspec/runner/actions/debug.rb', line 15

def unregister
  super
  MSpec.unregister :before, self
end