Class: KnapsackPro::Adapters::CucumberAdapter
Constant Summary
collapse
- TEST_DIR_PATTERN =
'features/**{,/*/**}/*.feature'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseAdapter
bind, #bind, #bind_save_queue_report
Class Method Details
.test_path(object) ⇒ Object
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/knapsack_pro/adapters/cucumber_adapter.rb', line 6
def self.test_path(object)
if Cucumber::VERSION.to_i >= 2
test_case = object
test_case.location.file
else
if object.respond_to?(:scenario_outline)
if object.scenario_outline.respond_to?(:feature)
object.scenario_outline.feature.file
else
object.scenario_outline.file
end
else
if object.respond_to?(:feature)
object.feature.file
else
object.file
end
end
end
end
|
Instance Method Details
#bind_save_report(latest_error = nil) ⇒ Object
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/knapsack_pro/adapters/cucumber_adapter.rb', line 44
def bind_save_report(latest_error = nil)
::Kernel.at_exit do
latest_error = (latest_error || $!)
exit_status = latest_error.status if latest_error.is_a?(SystemExit)
KnapsackPro::Report.save
::Kernel.exit exit_status if exit_status
end
end
|
#bind_time_tracker ⇒ Object