Class: Multicuke::FeaturesDir
- Inherits:
-
Object
- Object
- Multicuke::FeaturesDir
- Defined in:
- lib/multicuke/runner.rb
Overview
Set of features under one specific directory
Instance Attribute Summary collapse
-
#duration ⇒ Object
Running time in ms for all features in this feature directory.
-
#failed ⇒ Object
writeonly
True if a scenario or step has failed for this set of features.
-
#name ⇒ Object
readonly
Directory name fo the features.
-
#scenarios_results ⇒ Object
Result string for passed/failed scenarios.
-
#steps_results ⇒ Object
Result string for passed/failed steps.
Instance Method Summary collapse
-
#failed? ⇒ Boolean
True if one feature has failed.
-
#human_name ⇒ Object
Human readable name used for index page (ex: user_logout –> User logout).
-
#initialize(dir_name) ⇒ FeaturesDir
constructor
A new instance of FeaturesDir.
Constructor Details
#initialize(dir_name) ⇒ FeaturesDir
Returns a new instance of FeaturesDir.
36 37 38 39 40 41 |
# File 'lib/multicuke/runner.rb', line 36 def initialize(dir_name) @name = dir_name @failed = false @scenarios_results = "" @steps_results = "" end |
Instance Attribute Details
#duration ⇒ Object
Running time in ms for all features in this feature directory
31 32 33 |
# File 'lib/multicuke/runner.rb', line 31 def duration @duration end |
#failed=(value) ⇒ Object (writeonly)
True if a scenario or step has failed for this set of features
34 35 36 |
# File 'lib/multicuke/runner.rb', line 34 def failed=(value) @failed = value end |
#name ⇒ Object (readonly)
Directory name fo the features
22 23 24 |
# File 'lib/multicuke/runner.rb', line 22 def name @name end |
#scenarios_results ⇒ Object
Result string for passed/failed scenarios
25 26 27 |
# File 'lib/multicuke/runner.rb', line 25 def scenarios_results @scenarios_results end |
#steps_results ⇒ Object
Result string for passed/failed steps
28 29 30 |
# File 'lib/multicuke/runner.rb', line 28 def steps_results @steps_results end |
Instance Method Details
#failed? ⇒ Boolean
True if one feature has failed
44 45 46 |
# File 'lib/multicuke/runner.rb', line 44 def failed? (scenarios_results.include?"failed") || (steps_results.include?"failed") end |
#human_name ⇒ Object
Human readable name used for index page (ex: user_logout –> User logout)
49 50 51 |
# File 'lib/multicuke/runner.rb', line 49 def human_name name.gsub(/[_-]/, " ").capitalize end |