From 80a2e3818f6535309999003bb3dd958c56fdd7b9 Mon Sep 17 00:00:00 2001 From: David Chelimsky Date: Mon, 16 Jan 2012 17:07:14 -0600 Subject: [PATCH] Ensure that values passed to `config.filter_run` are respected when running over DRb (using spork). - Fixes #554. --- lib/rspec/core/configuration_options.rb | 2 +- spec/rspec/core/configuration_options_spec.rb | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/rspec/core/configuration_options.rb b/lib/rspec/core/configuration_options.rb index 622511ccf1..d52d8b5b2f 100644 --- a/lib/rspec/core/configuration_options.rb +++ b/lib/rspec/core/configuration_options.rb @@ -33,7 +33,7 @@ def drb_argv end def filter_manager - @filter_manager ||= FilterManager.new + @filter_manager ||= RSpec::configuration.filter_manager end private diff --git a/spec/rspec/core/configuration_options_spec.rb b/spec/rspec/core/configuration_options_spec.rb index c09447542d..3d0c28acba 100644 --- a/spec/rspec/core/configuration_options_spec.rb +++ b/spec/rspec/core/configuration_options_spec.rb @@ -301,6 +301,13 @@ end end + describe "#filter_manager" do + it "returns the same object as RSpec::configuration.filter_manager" do + config_options_object.filter_manager. + should be(RSpec::configuration.filter_manager) + end + end + describe "sources: ~/.rspec, ./.rspec, custom, CLI, and SPEC_OPTS" do before(:each) do FileUtils.mkpath(File.expand_path("~"))