[DRE-commits] [SCM] ruby-rspec-core.git branch, master, updated. debian/2.10.1-2-12-gfba549d
Jérémy Bobbio
lunar at debian.org
Tue Mar 26 15:25:35 UTC 2013
The following commit has been merged in the master branch:
commit 2ae6c4f8b9c49e8a0e1006ec46ed7956c7838e43
Author: Jérémy Bobbio <lunar at debian.org>
Date: Tue Mar 26 15:04:58 2013 +0000
Add a patch to fix a CommandLine test
diff --git a/debian/patches/fix-commandline-test.patch b/debian/patches/fix-commandline-test.patch
new file mode 100644
index 0000000..693316d
--- /dev/null
+++ b/debian/patches/fix-commandline-test.patch
@@ -0,0 +1,33 @@
+Description: Fix 'CommandLine configures streams before command line options' when no .rspec exists
+Author: Jérémy Bobbio <lunar at debian.org>
+Last-Update: 2013-03-26
+
+When running the specs from an unpacked gem, there is no `.rspec` available, which
+means that `config.force` never gets called and the "Comamndline configures
+streams before command line options" test fails.
+
+So instead of relying on a file that is not always present, we temporarily pass
+a 'forced' option through an environment variable.
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/rspec/core/command_line_spec.rb
++++ b/spec/rspec/core/command_line_spec.rb
+@@ -15,6 +15,9 @@ module RSpec::Core
+ it "configures streams before command line options" do
+ config.stub :load_spec_files
+
++ old_env = ENV['SPEC_OPTS']
++ ENV['SPEC_OPTS'] = '--default_path spec'
++
+ # this is necessary to ensure that color works correctly on windows
+ config.should_receive(:error_stream=).ordered
+ config.should_receive(:output_stream=).ordered
+@@ -22,6 +25,8 @@ module RSpec::Core
+
+ command_line = build_command_line
+ command_line.run err, out
++
++ ENV['SPEC_OPTS'] = old_env
+ end
+
+ it "assigns ConfigurationOptions built from Array of options to @options" do
diff --git a/debian/patches/series b/debian/patches/series
index 57da790..1ffcc64 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
disable-autotest-in-tests.patch
remove-rubygems-stuff-in-tests.patch
remove-aruba-stuff-in-tests.patch
+fix-commandline-test.patch
--
ruby-rspec-core.git
More information about the Pkg-ruby-extras-commits
mailing list