Module: RSpec::Core::SharedExampleGroup::TopLevelDSL
- Defined in:
- lib/rspec/core/shared_example_group.rb
Instance Method Summary (collapse)
- - (Object) share_as(name)
- - (Object) share_examples_for(*args)
- - (Object) shared_example_groups
- - (Object) shared_examples(*args) (also: #shared_context, #shared_examples_for)
Instance Method Details
- (Object) share_as(name)
67 68 69 70 |
# File 'lib/rspec/core/shared_example_group.rb', line 67 def share_as(name, &block) RSpec.deprecate("`share_as`", :replacement => "`RSpec::SharedContext` or `shared_examples`") SharedExampleGroup.registry.add_const('main', name, &block) end |
- (Object) share_examples_for(*args)
62 63 64 65 |
# File 'lib/rspec/core/shared_example_group.rb', line 62 def share_examples_for(*args, &block) RSpec.deprecate("`share_examples_for`", :replacement => "`shared_examples` or `shared_examples_for`") shared_examples(*args, &block) end |
- (Object) shared_example_groups
72 73 74 |
# File 'lib/rspec/core/shared_example_group.rb', line 72 def shared_example_groups SharedExampleGroup.registry.shared_example_groups_for('main') end |
- (Object) shared_examples(*args) Also known as: ,
55 56 57 |
# File 'lib/rspec/core/shared_example_group.rb', line 55 def shared_examples(*args, &block) SharedExampleGroup.registry.add_group('main', *args, &block) end |