Module: Botrytis::CucumberIntegration
- Defined in:
- lib/botrytis/cucumber.rb
Defined Under Namespace
Modules: SemanticStepMatcher, StepDefinitionCollector
Classes: StepDefinitionAdapter
Constant Summary
collapse
- @@step_definitions =
[]
- @@semantic_matcher =
nil
- @@semantic_matches_count =
0
- @@total_step_attempts =
0
Class Method Summary
collapse
Class Method Details
.add_step_definition(step_def) ⇒ Object
60
61
62
63
64
|
# File 'lib/botrytis/cucumber.rb', line 60
def self.add_step_definition(step_def)
adapter = StepDefinitionAdapter.new(step_def)
@@step_definitions << adapter
end
|
.install! ⇒ Object
11
12
13
14
15
16
17
18
19
20
|
# File 'lib/botrytis/cucumber.rb', line 11
def self.install!
Cucumber::Glue::RegistryAndMore.prepend(SemanticStepMatcher)
Cucumber::Glue::StepDefinition.prepend(StepDefinitionCollector)
@@semantic_matcher = Botrytis::SemanticMatcher.new
end
|
.print_summary ⇒ Object
46
47
48
49
50
|
# File 'lib/botrytis/cucumber.rb', line 46
def self.print_summary
if @@semantic_matches_count > 0
puts "\nšÆ Botrytis Semantic Matching Summary: #{@@semantic_matches_count} fuzzy matches found"
end
end
|
.record_semantic_match! ⇒ Object
30
31
32
|
# File 'lib/botrytis/cucumber.rb', line 30
def self.record_semantic_match!
@@semantic_matches_count += 1
end
|
.record_step_attempt! ⇒ Object
34
35
36
|
# File 'lib/botrytis/cucumber.rb', line 34
def self.record_step_attempt!
@@total_step_attempts += 1
end
|
.semantic_matcher ⇒ Object
26
27
28
|
# File 'lib/botrytis/cucumber.rb', line 26
def self.semantic_matcher
@@semantic_matcher
end
|
.semantic_matches_count ⇒ Object
38
39
40
|
# File 'lib/botrytis/cucumber.rb', line 38
def self.semantic_matches_count
@@semantic_matches_count
end
|
.step_definitions ⇒ Object
22
23
24
|
# File 'lib/botrytis/cucumber.rb', line 22
def self.step_definitions
@@step_definitions
end
|
.total_step_attempts ⇒ Object
42
43
44
|
# File 'lib/botrytis/cucumber.rb', line 42
def self.total_step_attempts
@@total_step_attempts
end
|