Skip to content

Commit

Permalink
split one scenario into two for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
benilovj committed Oct 12, 2010
1 parent c4766ca commit ef712df
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions features/plugins.feature
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,9 @@ Feature: tools for plugins
As a plugin writer
I want tools which support readable, compact configurations and configuration debugging

Scenario: DSL for defining new records and printing the record type summary
Scenario: DSL for defining new record types and printing the record type summary
Given the following configuration:
"""
record_type("XYZ") do
field "RECORD_TYPE", :length => 5, :constrained_to => "REC01"
field "A_NUMBER", :length => 16, :constrained_to => /44123/
field "END_OF_RECORD", :length => 1
end
record_type("ABC") do
field "RECORD_TYPE", :length => 3
field "RECORD_SIZE", :length => 5
Expand All @@ -32,6 +26,27 @@ Feature: tools for plugins
+-----------+--------------+------------------------------------------+
| DEF | 7 | |
| ABC | 9 | |
| EXAMPLE02 | 44 | RECORD_TYPE = EXAMPLE02 |
| EXAMPLE01 | 49 | RECORD_TYPE = EXAMPLE01 |
+-----------+--------------+------------------------------------------+
"""

Scenario: DSL for defining constraints on record types
Given the following configuration:
"""
record_type("XYZ") do
field "RECORD_TYPE", :length => 5, :constrained_to => "REC01"
field "A_NUMBER", :length => 16, :constrained_to => /44123/
field "END_OF_RECORD", :length => 1
end
"""
When the record type configuration is printed
Then it should look like this:
"""
+-----------+--------------+------------------------------------------+
| type name | total length | constraints |
+-----------+--------------+------------------------------------------+
| XYZ | 22 | RECORD_TYPE = REC01, A_NUMBER =~ /44123/ |
| EXAMPLE02 | 44 | RECORD_TYPE = EXAMPLE02 |
| EXAMPLE01 | 49 | RECORD_TYPE = EXAMPLE01 |
Expand Down

0 comments on commit ef712df

Please sign in to comment.