Class: Rutema::Specification
- Inherits:
-
Object
- Object
- Rutema::Specification
- Includes:
- SpecificationElement
- Defined in:
- lib/rutema/core/objectmodel.rb
Overview
A Rutema::Specification encompasses all elements required to run a test, the builds used, the scenario to run, together with a textual description and information that aids in tracing the test back to the requirements.
Instance Attribute Summary collapse
-
#scenario ⇒ Object
Returns the value of attribute scenario.
Instance Method Summary collapse
-
#initialize(params) ⇒ Specification
constructor
Expects a Hash of parameters.
-
#to_s ⇒ Object
Create a concise string representation consisting of
nameandtitle.
Methods included from SpecificationElement
#attribute, #method_missing, #respond_to?, #respond_to_missing?
Constructor Details
#initialize(params) ⇒ Specification
Expects a Hash of parameters
Following keys have meaning in initialization:
:name - the name of the testcase. Should uniquely identify the testcase
:title - a one liner describing what the testcase does
:filename - the filename describing the testcase
:description - a full textual description for the testcase. To be used in reports and documents
:scenario - An instance of Rutema::Scenario
:version - The version of this specification
Default values are empty strings and arrays. (scenario is nil)
96 97 98 99 100 101 102 103 104 |
# File 'lib/rutema/core/objectmodel.rb', line 96 def initialize(params) @attributes = params if params @attributes ||= {} @attributes[:name] ||= "" @attributes[:title] ||= "" @attributes[:filename] ||= "" @attributes[:description] ||= "" @scenario = @attributes[:scenario] end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Rutema::SpecificationElement
Instance Attribute Details
#scenario ⇒ Object
Returns the value of attribute scenario.
76 77 78 |
# File 'lib/rutema/core/objectmodel.rb', line 76 def scenario @scenario end |
Instance Method Details
#to_s ⇒ Object
Create a concise string representation consisting of name and title
108 109 110 |
# File 'lib/rutema/core/objectmodel.rb', line 108 def to_s return "#{@attributes[:name]} - #{@attributes[:title]}" end |