Enable debugger if rdebug is installed for specs. - reportable - Fork of reportable required by WarVox, from hdm/reportable.
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
---
(DIR) commit 33fe1197f6f34ee2f9da7516e818559713fba948
(DIR) parent 4bb49b35c74bc87eb43f7c3fb638273ab11da7a3
(HTM) Author: Myron Marston <myron.marston@gmail.com>
Date: Fri, 3 Apr 2009 08:14:41 +0800
Enable debugger if rdebug is installed for specs.
Signed-off-by: Marco Otte-Witte <marco.otte-witte@simplabs.com>
Diffstat:
M spec/spec_helper.rb | 9 +++++++++
1 file changed, 9 insertions(+), 0 deletions(-)
---
(DIR) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
@@ -13,3 +13,11 @@ require File.join(File.dirname(__FILE__), 'boot') unless defined?(ActiveRecord)
class User < ActiveRecord::Base; end
class YieldMatchException < Exception; end
+
+begin
+ require 'ruby-debug'
+ Debugger.start
+ Debugger.settings[:autoeval] = true if Debugger.respond_to?(:settings)
+rescue LoadError
+ # ruby-debug wasn't available so neither can the debugging be
+end
+\ No newline at end of file