Skip to content

Commit

Permalink
Added code to start the debugger if it's available when running our s…
Browse files Browse the repository at this point in the history
…pecs or features.
  • Loading branch information
myronmarston committed Feb 25, 2010
1 parent c4907bb commit 6d9cf3b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions features/support/env.rb
@@ -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|
Expand Down
8 changes: 8 additions & 0 deletions spec/spec_helper.rb
Expand Up @@ -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}
Expand Down

0 comments on commit 6d9cf3b

Please sign in to comment.