Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: rspec/rspec-core
base: master
...
head fork: rspec/rspec-core
compare: 2-2-maintenance
Checking mergeability… Don't worry, you can still create the pull request.
  • 5 commits
  • 7 files changed
  • 0 commit comments
  • 1 contributor
Commits on Nov 29, 2010
@dchelimsky dchelimsky history 393626f
@dchelimsky dchelimsky Revert "Make debugger statements _just work_"
- restore the --debugger/-d option
- this created a situation in which debugger did not work at all with
  rails, so need to figure out a different solution

This reverts commit 2466831.
2eb3c72
@dchelimsky dchelimsky update history f299d6e
@dchelimsky dchelimsky bump version to 2.2.1 f6f7c23
@dchelimsky dchelimsky date in history d2ee251
View
10 History.markdown
@@ -1,5 +1,15 @@
## rspec-core release history (incomplete)
+### 2.2.1 / 2010-11-28
+
+[full changelog](http://github.com/rspec/rspec-core/compare/v2.2.0...master)
+
+* Bug fixes
+ * alias_method instead of override Kernel#method_missing (John Wilger)
+ * changed --autotest to --tty in generated command (MIKAMI Yoshiyuki)
+ * revert change to debugger (had introduced conflict with Rails)
+ * also restored --debugger/-debug option
+
### 2.2.0 / 2010-11-28
[full changelog](http://github.com/rspec/rspec-core/compare/v2.1.0...v2.2.0)
View
2  Upgrade.markdown
@@ -94,7 +94,7 @@ JRuby installation to a newer release that allows the example to pass, RSpec
will report it as a failure (`Expected pending '...' to fail. No Error was raised.`),
so that know that you can remove the call to `pending`.
-# rspec-core-2.0
+# New features in rspec-core-2.0
### Runner
View
20 lib/rspec/core/configuration.rb
@@ -176,11 +176,21 @@ def requires=(paths)
end
def debug=(bool)
- RSpec.warn_deprecation <<-WARNING
-The debug option (config.debug = true or --debug/-d on the command line)
-is deprecated and no longer has any effect. This message will be removed
-from future versions of RSpec.
-WARNING
+ return unless bool
+ begin
+ require 'ruby-debug'
+ rescue LoadError
+ raise <<-EOM
+
+#{'*'*50}
+You must install ruby-debug to run rspec with the --debug option.
+
+If you have ruby-debug installed as a ruby gem, then you need to either
+require 'rubygems' or configure the RUBYOPT environment variable with
+the value 'rubygems'.
+#{'*'*50}
+EOM
+ end
end
def line_number=(line_number)
View
28 lib/rspec/core/extensions/kernel.rb
@@ -1,27 +1,5 @@
module Kernel
-
- private
-
- alias_method :method_missing_without_debugger, :method_missing
-
- def method_missing(m, *a)
- if m.to_s == 'debugger'
- begin
- require 'ruby-debug'
- debugger
- rescue LoadError => e
- warn <<-EOM
-#{'*'*50}
-The debugger statement on the following line was ignored:
-
- #{caller(0).detect {|l| l !~ /method_missing/}}
-
-To use the debugger statement, you must install ruby-debug.
-#{'*'*50}
-EOM
- end
- else
- method_missing_without_debugger(m, *a)
- end
- end
+ def debugger(*args)
+ RSpec.configuration.error_stream.puts "debugger statement ignored, use -d or --debug option to enable debugging\n#{caller(0)[1]}"
+ end unless respond_to?(:debugger)
end
View
2  lib/rspec/core/version.rb
@@ -1,7 +1,7 @@
module RSpec # :nodoc:
module Core # :nodoc:
module Version # :nodoc:
- STRING = '2.2.0'
+ STRING = '2.2.1'
end
end
end
View
13 spec/rspec/core/configuration_spec.rb
@@ -503,13 +503,20 @@ def that_thing
end
end
- describe "#debug=" do
- it "is deprecated" do
- RSpec.should_receive(:warn_deprecation)
+ describe "#debug=true" do
+ it "requires 'ruby-debug'" do
+ config.should_receive(:require).with('ruby-debug')
config.debug = true
end
end
+ describe "#debug=false" do
+ it "does not require 'ruby-debug'" do
+ config.should_not_receive(:require).with('ruby-debug')
+ config.debug = false
+ end
+ end
+
describe "#output=" do
it "sets the output" do
output = mock("output")
View
9 spec/rspec/core/kernel_extensions_spec.rb
@@ -1,12 +1,9 @@
require 'spec_helper'
describe "extensions" do
- describe "#debugger" do
- it "warns if ruby-debug is not installed" do
- object = Object.new
- object.should_receive(:warn).with(/debugger .* ignored:\n.* ruby-debug/m)
- object.stub(:require) { raise LoadError }
- object.__send__ :method_missing, :debugger
+ describe "debugger" do
+ it "is defined on Kernel" do
+ Kernel.should respond_to(:debugger)
end
end
end

No commit comments for this range

Something went wrong with that request. Please try again.