Module: RSpec::Core::SharedContext
Relationships & Source Files | |
Namespace Children | |
Classes:
| |
Defined in: | rspec-core/lib/rspec/core/shared_context.rb |
Overview
Exposes ExampleGroup
-level methods to a module, so you can include that module in an ExampleGroup
.
Class Method Summary
- .record(methods) Internal use only Internal use only
Instance Method Summary
- #__shared_context_recordings Internal use only Internal use only
- #included(group) Internal use only Internal use only
Class Method Details
.record(methods)
This method is for internal use only.
[ GitHub ]
# File 'rspec-core/lib/rspec/core/shared_context.rb', line 40
def self.record(methods) methods.each do |meth| define_method(meth) do |*args, &block| __shared_context_recordings << Recording.new(meth, args, block) end end end
Instance Method Details
#included(group)
This method is for internal use only.
[ GitHub ]
# File 'rspec-core/lib/rspec/core/shared_context.rb', line 21
def included(group) __shared_context_recordings.each do |recording| recording.playback_onto(group) end end