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

Commit

Permalink
Remove spec for behavior we will no longer be supporting.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
myronmarston committed Dec 19, 2014
1 parent 53b8c0b commit fa61873
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions spec/rspec/core/configuration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1530,23 +1530,6 @@ def exclude?(line)
expect(group.included_modules).to include(mod)
end

it "includes each one before deciding whether to include the next" do
mod1 = Module.new do
def self.included(host)
host.metadata[:foo] = :bar
end
end
mod2 = Module.new

group = RSpec.describe("group")

config.include(mod1)
config.include(mod2, :foo => :bar)
config.configure_group(group)
expect(group.included_modules).to include(mod1)
expect(group.included_modules).to include(mod2)
end

module IncludeExtendOrPrependMeOnce
def self.included(host)
raise "included again" if host.instance_methods.include?(:foobar)
Expand Down

0 comments on commit fa61873

Please sign in to comment.