Method: RSpec::Core::Configuration#prepend
- Defined in:
- lib/rspec/core/configuration.rb
#prepend(mod, *filters) ⇒ void
Tells RSpec to prepend example groups with mod. Methods defined in
mod are exposed to examples (not example groups). Use filters to
constrain the groups in which to prepend the module.
Similar to include, but module is included before the example group's class
in the ancestor chain.
1564 1565 1566 1567 1568 |
# File 'lib/rspec/core/configuration.rb', line 1564 def prepend(mod, *filters) define_mixed_in_module(mod, filters, @prepend_modules, :prepend) do |group| safe_prepend(mod, group) end end |