Module: Nonnative::Cucumber
- Defined in:
- lib/nonnative/cucumber.rb
Overview
Lazily installs the Cucumber integration once the Cucumber Ruby DSL is ready.
Requiring ‘nonnative` outside a running Cucumber environment should not fail, but when Cucumber does finish booting its support-code registry this installer still needs to register the hooks and step definitions defined here.
Supported hooks:
-
‘@startup`: start before scenario, stop after scenario
-
‘@manual`: stop after scenario; use `When I start the system` to start manually
-
‘@clear`: clear memoized Nonnative state before scenario
-
‘@reset`: reset proxies after scenario
Installed step definitions:
-
‘Given I set the proxy for service string to string`
-
‘Then I should reset the proxy for service string`
-
‘When I start the system`
-
‘When I attempt to start the system`
-
‘When I attempt to stop the system`
-
‘Then I should see string as unhealthy`
-
‘Then I should see string as healthy`
-
‘Then the process string should consume less than string of memory`
-
‘Then starting the system should raise an error`
-
‘Then stopping the system should raise an error`
-
‘Then I should see a log entry of string for process string`
-
‘Then I should see a log entry of string in the file string`
Defined Under Namespace
Modules: Assertions, LanguageHook, LifecycleSteps, ProxySteps, Registration, WorldHooks
Class Method Summary collapse
Class Method Details
.bootstrap! ⇒ Object
221 222 223 224 225 226 227 228 229 |
# File 'lib/nonnative/cucumber.rb', line 221 def bootstrap! return if @bootstrapped dsl_singleton = ::Cucumber::Glue::Dsl.singleton_class dsl_singleton.prepend(LanguageHook) unless dsl_singleton.ancestors.include?(LanguageHook) @bootstrapped = true install! end |
.install! ⇒ Object
231 232 233 234 235 236 237 |
# File 'lib/nonnative/cucumber.rb', line 231 def install! return if @installed return unless ready? Registration.install! @installed = true end |