Class: Cucover::TestRun
- Inherits:
-
Object
- Object
- Cucover::TestRun
- Defined in:
- lib/cucover.rb
Instance Method Summary collapse
- #fail! ⇒ Object
-
#initialize(feature_file, visitor) ⇒ TestRun
constructor
A new instance of TestRun.
- #may_execute? ⇒ Boolean
- #record(source_file) ⇒ Object
- #watch ⇒ Object
Constructor Details
#initialize(feature_file, visitor) ⇒ TestRun
Returns a new instance of TestRun.
18 19 20 |
# File 'lib/cucover.rb', line 18 def initialize(feature_file, visitor) @feature_file, @visitor = feature_file, visitor end |
Instance Method Details
#fail! ⇒ Object
26 27 28 |
# File 'lib/cucover.rb', line 26 def fail! @failed = true end |
#may_execute? ⇒ Boolean
42 43 44 |
# File 'lib/cucover.rb', line 42 def may_execute? dirty? || failed_on_last_run? end |
#record(source_file) ⇒ Object
22 23 24 |
# File 'lib/cucover.rb', line 22 def record(source_file) additional_covered_files << source_file end |
#watch ⇒ Object
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/cucover.rb', line 30 def watch announce_skip unless may_execute? analyzer.run_hooked do yield end record(@feature_file) source_files_cache.save analyzed_files status_cache.record(status) end |