Permalink
Browse files

Added code to start the debugger if it's available when running our s…

…pecs or features.
  • Loading branch information...
myronmarston committed Feb 25, 2010
1 parent c4907bb commit 6d9cf3b7c623b1c0fc3b871ae7ea4b69a7ed5dc5
Showing with 16 additions and 0 deletions.
  1. +8 −0 features/support/env.rb
  2. +8 −0 spec/spec_helper.rb
View
@@ -1,6 +1,14 @@
$LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../lib')
require 'vcr'
+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
+
require 'spec/expectations'
VCR.config do |c|
View
@@ -5,6 +5,14 @@
require 'spec'
require 'spec/autorun'
+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
+
# Requires supporting files with custom matchers and macros, etc,
# in ./support/ and its subdirectories.
Dir[File.expand_path(File.join(File.dirname(__FILE__),'support','**','*.rb'))].each {|f| require f}

0 comments on commit 6d9cf3b

Please sign in to comment.