-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
Copy pathinstall_plugin_hook.feature
36 lines (33 loc) · 1.18 KB
/
install_plugin_hook.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Feature: InstallPlugin Hook
In order to extend Cucumber
As a developer
I want to manipulate the Cucumber configuration after it has been created
Scenario: Changing the output format
Given a file named "features/support/env.rb" with:
"""
InstallPlugin do |config|
config.formats << ['message', {}, config.out_stream]
end
"""
And a file named "features/simple_scenario.feature" with:
"""
Feature:
Scenario:
Given a step
"""
When I run `cucumber features --publish-quiet`
Then the stderr should not contain anything
And the output should contain NDJSON with key "uri" and value "features/simple_scenario.feature"
Scenario: feature directories read from configuration
Given a file named "features/support/env.rb" with:
"""
InstallPlugin do |config|
config.out_stream << "InstallPlugin hook read feature directories: #{config.feature_dirs.join(', ')}"
end
"""
When I run `cucumber features --publish-quiet`
Then the stderr should not contain anything
And the output should contain:
"""
InstallPlugin hook read feature directories: features
"""