Class: Launcuke::FeaturesDir
- Inherits:
-
Object
- Object
- Launcuke::FeaturesDir
- Defined in:
- lib/launcuke/runner.rb
Overview
Set of features under one specific directory
Instance Attribute Summary collapse
-
#dir_name ⇒ Object
readonly
Directory name fo the features.
-
#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.
-
#last_tested_time ⇒ Object
Last test finished at.
-
#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(directory_name) ⇒ FeaturesDir
constructor
A new instance of FeaturesDir.
Constructor Details
#initialize(directory_name) ⇒ FeaturesDir
Returns a new instance of FeaturesDir.
39 40 41 42 43 44 45 |
# File 'lib/launcuke/runner.rb', line 39 def initialize(directory_name) @dir_name = directory_name @failed = false @scenarios_results = "" @steps_results = "" @last_tested_time = "" end |
Instance Attribute Details
#dir_name ⇒ Object (readonly)
Directory name fo the features
22 23 24 |
# File 'lib/launcuke/runner.rb', line 22 def dir_name @dir_name end |
#duration ⇒ Object
Running time in ms for all features in this feature directory
31 32 33 |
# File 'lib/launcuke/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/launcuke/runner.rb', line 34 def failed=(value) @failed = value end |
#last_tested_time ⇒ Object
Last test finished at
37 38 39 |
# File 'lib/launcuke/runner.rb', line 37 def last_tested_time @last_tested_time end |
#scenarios_results ⇒ Object
Result string for passed/failed scenarios
25 26 27 |
# File 'lib/launcuke/runner.rb', line 25 def scenarios_results @scenarios_results end |
#steps_results ⇒ Object
Result string for passed/failed steps
28 29 30 |
# File 'lib/launcuke/runner.rb', line 28 def steps_results @steps_results end |
Instance Method Details
#failed? ⇒ Boolean
True if one feature has failed
48 49 50 |
# File 'lib/launcuke/runner.rb', line 48 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)
53 54 55 |
# File 'lib/launcuke/runner.rb', line 53 def human_name dir_name.gsub(/[_-]/, " ").capitalize end |