Class: KnapsackPro::Adapters::CucumberAdapter
Constant Summary
collapse
- TEST_DIR_PATTERN =
'features/**{,/*/**}/*.feature'
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from BaseAdapter
adapter_bind_method_called_file, bind, #bind, slow_test_file?, verify_bind_method_called
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_before_queue_hook ⇒ Object
56
57
58
59
60
61
62
63
64
|
# File 'lib/knapsack_pro/adapters/cucumber_adapter.rb', line 56
def bind_before_queue_hook
Around do |object, block|
unless ENV['KNAPSACK_PRO_BEFORE_QUEUE_HOOK_CALLED']
KnapsackPro::Hooks::Queue.call_before_queue
ENV['KNAPSACK_PRO_BEFORE_QUEUE_HOOK_CALLED'] = 'true'
end
block.call
end
end
|
#bind_queue_mode ⇒ Object
#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