Class: RSpec::Core::ExampleGroup
- Inherits:
-
Object
- Object
- RSpec::Core::ExampleGroup
- Defined in:
- lib/rspec/core/example_group_patch.rb
Overview
Monkey patch RSpec to add the feature method in example groups
Class Method Summary collapse
Class Method Details
.orig_subclass ⇒ Object
22 |
# File 'lib/rspec/core/example_group_patch.rb', line 22 alias orig_subclass subclass |
.subclass(parent, description, *all_args, &example_group_block) ⇒ Object
24 25 26 27 28 29 30 31 32 |
# File 'lib/rspec/core/example_group_patch.rb', line 24 def subclass(parent, description, *all_args, &example_group_block) rutabaga = all_args.first.any? { |arg| arg.is_a?(Hash) && arg[:rutabaga] } orig_subclass(parent, description, *all_args, &example_group_block).tap do |describe| if rutabaga Rutabaga::ExampleGroup::Feature.feature(describe, description, all_args.last) end end end |