This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
:suite hooks should not support metadata #1741
Closed
Description
In #1725 there's discussion around a code snippet that includes this:
RSpec.configure do |config|
config.before :suite, type: :feature do
# ...
end
end
The type: :feature
metadata doesn't do anything (at least, it shouldn't) because it's nonsensical. Metadata applies to individual example groups and examples, not to the suite as a whole and before(:suite)
hooks always get run. The fact that it is allowed here is an accident of implementation since other hook scopes allow metadata. We should explicitly disallow it in RSpec 4, and in RSpec 3 perhaps warn that it doesn't do anything.
Metadata
Metadata
Assignees
Labels
No labels