Class: Vigia::Sail::GroupInstance
- Inherits:
-
RSpecObject
- Object
- RSpecObject
- Vigia::Sail::GroupInstance
- Defined in:
- lib/vigia/sail/group_instance.rb
Instance Attribute Summary collapse
-
#described_object ⇒ Object
Returns the value of attribute described_object.
-
#description ⇒ Object
Returns the value of attribute description.
-
#group ⇒ Object
Returns the value of attribute group.
-
#parent_object ⇒ Object
Returns the value of attribute parent_object.
Attributes inherited from RSpecObject
Instance Method Summary collapse
Methods inherited from RSpecObject
clean!, #contextual_object, inherited, #initialize, register, setup_and_run
Methods included from Hooks
#execute_hook, #hooks_for_object, #with_hooks
Constructor Details
This class inherits a constructor from Vigia::Sail::RSpecObject
Instance Attribute Details
#described_object ⇒ Object
Returns the value of attribute described_object.
5 6 7 |
# File 'lib/vigia/sail/group_instance.rb', line 5 def described_object @described_object end |
#description ⇒ Object
Returns the value of attribute description.
5 6 7 |
# File 'lib/vigia/sail/group_instance.rb', line 5 def description @description end |
#group ⇒ Object
Returns the value of attribute group.
5 6 7 |
# File 'lib/vigia/sail/group_instance.rb', line 5 def group @group end |
#parent_object ⇒ Object
Returns the value of attribute parent_object.
5 6 7 |
# File 'lib/vigia/sail/group_instance.rb', line 5 def parent_object @parent_object end |
Instance Method Details
#run(rspec_context) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/vigia/sail/group_instance.rb', line 7 def run(rspec_context) with_hooks(rspec_context) do group.children.each do |group_name| Vigia::Sail::Group.setup_and_run(group_name, rspec_context) end group.contexts.each do |context_name| Vigia::Sail::Context.setup_and_run(context_name, rspec_context) end end end |
#to_s ⇒ Object
19 20 21 |
# File 'lib/vigia/sail/group_instance.rb', line 19 def to_s description.respond_to?(:call) ? instance_exec(&description) : description end |