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.
1557 1558 1559 1560 1561 |
# File 'lib/rspec/core/configuration.rb', line 1557 def prepend(mod, *filters) define_mixed_in_module(mod, filters, @prepend_modules, :prepend) do |group| safe_prepend(mod, group) end end |