-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommented_proccessed_header.feature
90 lines (73 loc) · 2.11 KB
/
commented_proccessed_header.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
Feature: Generate commented processed header
In order to include a processed header in the processed files
As programming language
I need a properly commented header
Scenario: C Language Template
Given a file named "code.c.erb" with:
"""
<%= erb_processor.commented_processed_header %>
some code
"""
When I successfully run `erb-processor .`
Then a file named "code.c" should contain exactly:
"""
/*
WARNING: DO NOT EDIT directly
HOWTO Modify this file
1. Edit the file ./code.c.erb
2. $ erb-processor .
*/
some code
"""
Scenario: HTML Language Template
Given a file named "code.html.erb" with:
"""
<%= erb_processor.commented_processed_header %>
some code
"""
When I successfully run `erb-processor .`
Then a file named "code.html" should contain exactly:
"""
<!--
WARNING: DO NOT EDIT directly
HOWTO Modify this file
1. Edit the file ./code.html.erb
2. $ erb-processor .
-->
some code
"""
Scenario: Gherkin Language Template
Given a file named "code.feature.erb" with:
"""
Feature: a feature description
<%= erb_processor.commented_processed_header %>
some code
"""
When I successfully run `erb-processor .`
Then a file named "code.feature" should contain exactly:
"""
Feature: a feature description
#
# WARNING: DO NOT EDIT directly
#
# HOWTO Modify this file
# 1. Edit the file ./code.feature.erb
# 2. $ erb-processor .
#
some code
"""
Scenario: Unknown Language Template
Given a file named "some-exotic-code.erb" with:
"""
<%= erb_processor.commented_processed_header -%>
some code
"""
When I successfully run `erb-processor .`
Then a file named "some-exotic-code" should contain exactly:
"""
WARNING: DO NOT EDIT directly
HOWTO Modify this file
1. Edit the file ./some-exotic-code.erb
2. $ erb-processor .
some code
"""