Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 9062f3a

Browse files
committed
Remove spec for behavior we will no longer be supporting.
Fully supporting metadata mutation is fraught with difficulties see (rspec/rspec-rails#829 and the attempted fix in #1089). For RSpec 3, we decided to expose `define_derived_metadata` as an officially supported way to accomplish the sorts of things metadata mutation was used for in RSpec 2. This spec got left behind (since it was passing at the time, it wasn't noticed) but isn’t something we want to support going forward since module inclusion shouldn't mutate metadata. It’s also getting in the way of a perf optimization I'm implementing.
1 parent 7edf443 commit 9062f3a

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

spec/rspec/core/configuration_spec.rb

-17
Original file line numberDiff line numberDiff line change
@@ -1530,23 +1530,6 @@ def exclude?(line)
15301530
expect(group.included_modules).to include(mod)
15311531
end
15321532

1533-
it "includes each one before deciding whether to include the next" do
1534-
mod1 = Module.new do
1535-
def self.included(host)
1536-
host.metadata[:foo] = :bar
1537-
end
1538-
end
1539-
mod2 = Module.new
1540-
1541-
group = RSpec.describe("group")
1542-
1543-
config.include(mod1)
1544-
config.include(mod2, :foo => :bar)
1545-
config.configure_group(group)
1546-
expect(group.included_modules).to include(mod1)
1547-
expect(group.included_modules).to include(mod2)
1548-
end
1549-
15501533
module IncludeExtendOrPrependMeOnce
15511534
def self.included(host)
15521535
raise "included again" if host.instance_methods.include?(:foobar)

0 commit comments

Comments
 (0)