Skip to content
This repository
Browse code

add --debug option

  • Loading branch information...
commit 57aae9af0e660edcf19418a6539712e3cfa6de10 1 parent 1661704
David Chelimsky dchelimsky authored
4 lib/rspec/core/command_line_options.rb
@@ -51,6 +51,10 @@ def parse
51 51 options[:full_backtrace] = true
52 52 end
53 53
  54 + opts.on('-d', '--debug', 'Enable debugging') do |o|
  55 + options[:debug] = true
  56 + end
  57 +
54 58 opts.on_tail('-h', '--help', "You're looking at it.") do
55 59 puts opts
56 60 exit
7 spec/rspec/core/command_line_options_spec.rb
@@ -121,5 +121,12 @@ def options_from_args(*args)
121 121 end
122 122 end
123 123
  124 + describe "--debug (-d)" do
  125 + it "sets debug on config" do
  126 + options_from_args("--debug").should include(:debug => true)
  127 + options_from_args("-d").should include(:debug => true)
  128 + end
  129 + end
  130 +
124 131 end
125 132

0 comments on commit 57aae9a

Please sign in to comment.
Something went wrong with that request. Please try again.