Class: Webspec::ExampleGroup
- Inherits:
-
Object
- Object
- Webspec::ExampleGroup
- Defined in:
- lib/webspec/example_group.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#run ⇒ Object
Returns the value of attribute run.
Instance Method Summary collapse
- #create_example(example) ⇒ Object
- #create_example_group(example_group) ⇒ Object
-
#initialize(params = {}) ⇒ ExampleGroup
constructor
A new instance of ExampleGroup.
Constructor Details
#initialize(params = {}) ⇒ ExampleGroup
Returns a new instance of ExampleGroup.
5 6 7 8 |
# File 'lib/webspec/example_group.rb', line 5 def initialize(params = {}) @id = params["_id"] @run = params[:run] end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/webspec/example_group.rb', line 3 def id @id end |
#parent ⇒ Object
Returns the value of attribute parent.
3 4 5 |
# File 'lib/webspec/example_group.rb', line 3 def parent @parent end |
#run ⇒ Object
Returns the value of attribute run.
3 4 5 |
# File 'lib/webspec/example_group.rb', line 3 def run @run end |
Instance Method Details
#create_example(example) ⇒ Object
16 17 18 |
# File 'lib/webspec/example_group.rb', line 16 def create_example(example) Webspec.create_example(example, run, self) end |
#create_example_group(example_group) ⇒ Object
10 11 12 13 14 |
# File 'lib/webspec/example_group.rb', line 10 def create_example_group(example_group) example_group = Webspec.create_example_group(example_group, run, self) example_group.parent = self example_group end |