Method: RSpec::Core::Configuration#extend
- Defined in:
- lib/rspec/core/configuration.rb
#extend(mod, *filters) ⇒ void
Tells RSpec to extend example groups with mod. Methods defined in
mod are exposed to example groups (not examples). Use filters to
constrain the groups to extend.
Similar to include, but behavior is added to example groups, which
are classes, rather than the examples, which are instances of those
classes.
1518 1519 1520 1521 1522 |
# File 'lib/rspec/core/configuration.rb', line 1518 def extend(mod, *filters) define_mixed_in_module(mod, filters, @extend_modules, :extend) do |group| safe_extend(mod, group) end end |