Description: Fix patch to rspec binary
 On Debian rspec is always on /usr/bin
Author: Antonio Terceiro <terceiro@debian.org>
Origin: vendor
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782161
Last-Update: 2016-03-02
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/rspec-core/lib/rspec/core/rake_task.rb
+++ b/rspec-core/lib/rspec/core/rake_task.rb
@@ -22,7 +22,7 @@
       include RSpec::Core::ShellEscape
 
       # Default path to the RSpec executable.
-      DEFAULT_RSPEC_PATH = File.expand_path('../../../../exe/rspec', __FILE__)
+      DEFAULT_RSPEC_PATH = '/usr/bin/rspec'
 
       # Default pattern for spec files.
       DEFAULT_PATTERN = 'spec/**{,/*/**}/*_spec.rb'
@@ -141,7 +141,6 @@
         cmd_parts = []
         cmd_parts << RUBY
         cmd_parts << ruby_opts
-        cmd_parts << rspec_load_path
         cmd_parts << escape(rspec_path)
         cmd_parts << file_inclusion_specification
         cmd_parts << file_exclusion_specification
@@ -153,15 +152,6 @@
         lambda { |s| s.nil? || s == "" }
       end
 
-      def rspec_load_path
-        @rspec_load_path ||= begin
-          core_and_support = $LOAD_PATH.grep(
-            /#{File::SEPARATOR}rspec-(core|support)[^#{File::SEPARATOR}]*#{File::SEPARATOR}lib/
-          ).uniq
-
-          "-I#{core_and_support.map { |file| escape file }.join(File::PATH_SEPARATOR)}"
-        end
-      end
     end
   end
 end
--- a/rspec-core/spec/rspec/core/rake_task_spec.rb
+++ b/rspec-core/spec/rspec/core/rake_task_spec.rb
@@ -32,18 +32,16 @@
       end
     end
 
-    default_load_path_opts = '-I\S+'
-
     context "default" do
       it "renders rspec" do
-        expect(spec_command).to match(/^#{ruby} #{default_load_path_opts} '?#{task.rspec_path}'?/)
+        expect(spec_command).to match(/^#{ruby} '?#{task.rspec_path}'?/)
       end
     end
 
     context "with space", :unless => RSpec::Support::OS.windows? do
       it "renders rspec with space escaped" do
         task.rspec_path = '/path with space/exe/rspec'
-        expect(spec_command).to match(/^#{ruby} #{default_load_path_opts} \/path\\ with\\ space\/exe\/rspec/)
+        expect(spec_command).to match(/^#{ruby} \/path\\ with\\ space\/exe\/rspec/)
       end
     end
 
@@ -57,7 +55,7 @@
     context "with ruby options" do
       it "renders them before the rspec path" do
         task.ruby_opts = "-w"
-        expect(spec_command).to match(/^#{ruby} -w #{default_load_path_opts} '?#{task.rspec_path}'?/)
+        expect(spec_command).to match(/^#{ruby} -w '?#{task.rspec_path}'?/)
       end
     end
 
@@ -242,7 +240,7 @@
 
         expect(spec_command).not_to include_extra_load_path_entries
       end
-    end
+    end if false
 
     it "sets the files to run in a consistent order, regardless of the underlying FileList ordering" do
       task.pattern = 'a/*.rb'
