gherkin 2.12.2 → 3.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -15
- data/CONTRIBUTING.md +23 -0
- data/Gemfile +0 -3
- data/LICENSE +18 -17
- data/Makefile +65 -0
- data/README.md +9 -268
- data/Rakefile +17 -19
- data/bin/gherkin-generate-ast +21 -0
- data/bin/gherkin-generate-pickles +25 -0
- data/bin/gherkin-generate-tokens +12 -0
- data/gherkin-ruby.razor +218 -0
- data/gherkin.gemspec +22 -76
- data/lib/gherkin/ast_builder.rb +243 -0
- data/lib/gherkin/ast_node.rb +30 -0
- data/lib/gherkin/dialect.rb +58 -0
- data/lib/gherkin/errors.rb +45 -0
- data/lib/gherkin/gherkin-languages.json +2968 -0
- data/lib/gherkin/gherkin_line.rb +95 -0
- data/lib/gherkin/parser.rb +1910 -0
- data/lib/gherkin/pickles/compiler.rb +164 -0
- data/lib/gherkin/token.rb +18 -0
- data/lib/gherkin/token_formatter_builder.rb +39 -0
- data/lib/gherkin/token_matcher.rb +169 -0
- data/lib/gherkin/token_scanner.rb +40 -0
- data/spec/capture_warnings.rb +68 -0
- data/spec/coverage.rb +10 -0
- data/spec/gherkin/parser_spec.rb +146 -0
- metadata +60 -567
- data/.gitattributes +0 -2
- data/.mailmap +0 -2
- data/.rbenv-gemsets +0 -1
- data/.rspec +0 -1
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.yardopts +0 -5
- data/History.md +0 -881
- data/build_native_gems.sh +0 -7
- data/cucumber.yml +0 -5
- data/examples/parse_and_output_json.rb +0 -19
- data/ext/gherkin_lexer_ar/extconf.rb +0 -6
- data/ext/gherkin_lexer_ar/gherkin_lexer_ar.c +0 -1432
- data/ext/gherkin_lexer_bg/extconf.rb +0 -6
- data/ext/gherkin_lexer_bg/gherkin_lexer_bg.c +0 -1655
- data/ext/gherkin_lexer_bm/extconf.rb +0 -6
- data/ext/gherkin_lexer_bm/gherkin_lexer_bm.c +0 -1516
- data/ext/gherkin_lexer_ca/extconf.rb +0 -6
- data/ext/gherkin_lexer_ca/gherkin_lexer_ca.c +0 -1581
- data/ext/gherkin_lexer_cs/extconf.rb +0 -6
- data/ext/gherkin_lexer_cs/gherkin_lexer_cs.c +0 -1515
- data/ext/gherkin_lexer_cy_gb/extconf.rb +0 -6
- data/ext/gherkin_lexer_cy_gb/gherkin_lexer_cy_gb.c +0 -1282
- data/ext/gherkin_lexer_da/extconf.rb +0 -6
- data/ext/gherkin_lexer_da/gherkin_lexer_da.c +0 -1298
- data/ext/gherkin_lexer_de/extconf.rb +0 -6
- data/ext/gherkin_lexer_de/gherkin_lexer_de.c +0 -1425
- data/ext/gherkin_lexer_el/extconf.rb +0 -6
- data/ext/gherkin_lexer_el/gherkin_lexer_el.c +0 -1919
- data/ext/gherkin_lexer_en/extconf.rb +0 -6
- data/ext/gherkin_lexer_en/gherkin_lexer_en.c +0 -1418
- data/ext/gherkin_lexer_en_au/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_au/gherkin_lexer_en_au.c +0 -1765
- data/ext/gherkin_lexer_en_lol/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_lol/gherkin_lexer_en_lol.c +0 -1177
- data/ext/gherkin_lexer_en_old/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_old/gherkin_lexer_en_old.c +0 -1309
- data/ext/gherkin_lexer_en_pirate/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_pirate/gherkin_lexer_en_pirate.c +0 -1471
- data/ext/gherkin_lexer_en_scouse/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_scouse/gherkin_lexer_en_scouse.c +0 -1634
- data/ext/gherkin_lexer_en_tx/extconf.rb +0 -6
- data/ext/gherkin_lexer_en_tx/gherkin_lexer_en_tx.c +0 -1265
- data/ext/gherkin_lexer_eo/extconf.rb +0 -6
- data/ext/gherkin_lexer_eo/gherkin_lexer_eo.c +0 -1241
- data/ext/gherkin_lexer_es/extconf.rb +0 -6
- data/ext/gherkin_lexer_es/gherkin_lexer_es.c +0 -1399
- data/ext/gherkin_lexer_et/extconf.rb +0 -6
- data/ext/gherkin_lexer_et/gherkin_lexer_et.c +0 -1236
- data/ext/gherkin_lexer_fa/extconf.rb +0 -6
- data/ext/gherkin_lexer_fa/gherkin_lexer_fa.c +0 -1475
- data/ext/gherkin_lexer_fi/extconf.rb +0 -6
- data/ext/gherkin_lexer_fi/gherkin_lexer_fi.c +0 -1215
- data/ext/gherkin_lexer_fr/extconf.rb +0 -6
- data/ext/gherkin_lexer_fr/gherkin_lexer_fr.c +0 -1493
- data/ext/gherkin_lexer_gl/extconf.rb +0 -6
- data/ext/gherkin_lexer_gl/gherkin_lexer_gl.c +0 -1374
- data/ext/gherkin_lexer_he/extconf.rb +0 -6
- data/ext/gherkin_lexer_he/gherkin_lexer_he.c +0 -1374
- data/ext/gherkin_lexer_hi/extconf.rb +0 -6
- data/ext/gherkin_lexer_hi/gherkin_lexer_hi.c +0 -1848
- data/ext/gherkin_lexer_hr/extconf.rb +0 -6
- data/ext/gherkin_lexer_hr/gherkin_lexer_hr.c +0 -1323
- data/ext/gherkin_lexer_hu/extconf.rb +0 -6
- data/ext/gherkin_lexer_hu/gherkin_lexer_hu.c +0 -1376
- data/ext/gherkin_lexer_id/extconf.rb +0 -6
- data/ext/gherkin_lexer_id/gherkin_lexer_id.c +0 -1208
- data/ext/gherkin_lexer_is/extconf.rb +0 -6
- data/ext/gherkin_lexer_is/gherkin_lexer_is.c +0 -1376
- data/ext/gherkin_lexer_it/extconf.rb +0 -6
- data/ext/gherkin_lexer_it/gherkin_lexer_it.c +0 -1340
- data/ext/gherkin_lexer_ja/extconf.rb +0 -6
- data/ext/gherkin_lexer_ja/gherkin_lexer_ja.c +0 -1699
- data/ext/gherkin_lexer_kn/extconf.rb +0 -6
- data/ext/gherkin_lexer_kn/gherkin_lexer_kn.c +0 -1965
- data/ext/gherkin_lexer_ko/extconf.rb +0 -6
- data/ext/gherkin_lexer_ko/gherkin_lexer_ko.c +0 -1360
- data/ext/gherkin_lexer_lt/extconf.rb +0 -6
- data/ext/gherkin_lexer_lt/gherkin_lexer_lt.c +0 -1296
- data/ext/gherkin_lexer_lu/extconf.rb +0 -6
- data/ext/gherkin_lexer_lu/gherkin_lexer_lu.c +0 -1389
- data/ext/gherkin_lexer_lv/extconf.rb +0 -6
- data/ext/gherkin_lexer_lv/gherkin_lexer_lv.c +0 -1425
- data/ext/gherkin_lexer_nl/extconf.rb +0 -6
- data/ext/gherkin_lexer_nl/gherkin_lexer_nl.c +0 -1368
- data/ext/gherkin_lexer_no/extconf.rb +0 -6
- data/ext/gherkin_lexer_no/gherkin_lexer_no.c +0 -1311
- data/ext/gherkin_lexer_pa/extconf.rb +0 -6
- data/ext/gherkin_lexer_pa/gherkin_lexer_pa.c +0 -2160
- data/ext/gherkin_lexer_pl/extconf.rb +0 -6
- data/ext/gherkin_lexer_pl/gherkin_lexer_pl.c +0 -1738
- data/ext/gherkin_lexer_pt/extconf.rb +0 -6
- data/ext/gherkin_lexer_pt/gherkin_lexer_pt.c +0 -1711
- data/ext/gherkin_lexer_ro/extconf.rb +0 -6
- data/ext/gherkin_lexer_ro/gherkin_lexer_ro.c +0 -1427
- data/ext/gherkin_lexer_ru/extconf.rb +0 -6
- data/ext/gherkin_lexer_ru/gherkin_lexer_ru.c +0 -2071
- data/ext/gherkin_lexer_sk/extconf.rb +0 -6
- data/ext/gherkin_lexer_sk/gherkin_lexer_sk.c +0 -1739
- data/ext/gherkin_lexer_sr_cyrl/extconf.rb +0 -6
- data/ext/gherkin_lexer_sr_cyrl/gherkin_lexer_sr_cyrl.c +0 -2112
- data/ext/gherkin_lexer_sr_latn/extconf.rb +0 -6
- data/ext/gherkin_lexer_sr_latn/gherkin_lexer_sr_latn.c +0 -1567
- data/ext/gherkin_lexer_sv/extconf.rb +0 -6
- data/ext/gherkin_lexer_sv/gherkin_lexer_sv.c +0 -1324
- data/ext/gherkin_lexer_th/extconf.rb +0 -6
- data/ext/gherkin_lexer_th/gherkin_lexer_th.c +0 -2840
- data/ext/gherkin_lexer_tl/extconf.rb +0 -6
- data/ext/gherkin_lexer_tl/gherkin_lexer_tl.c +0 -2021
- data/ext/gherkin_lexer_tr/extconf.rb +0 -6
- data/ext/gherkin_lexer_tr/gherkin_lexer_tr.c +0 -1347
- data/ext/gherkin_lexer_tt/extconf.rb +0 -6
- data/ext/gherkin_lexer_tt/gherkin_lexer_tt.c +0 -1936
- data/ext/gherkin_lexer_uk/extconf.rb +0 -6
- data/ext/gherkin_lexer_uk/gherkin_lexer_uk.c +0 -1941
- data/ext/gherkin_lexer_uz/extconf.rb +0 -6
- data/ext/gherkin_lexer_uz/gherkin_lexer_uz.c +0 -1651
- data/ext/gherkin_lexer_vi/extconf.rb +0 -6
- data/ext/gherkin_lexer_vi/gherkin_lexer_vi.c +0 -1458
- data/ext/gherkin_lexer_zh_cn/extconf.rb +0 -6
- data/ext/gherkin_lexer_zh_cn/gherkin_lexer_zh_cn.c +0 -1314
- data/ext/gherkin_lexer_zh_tw/extconf.rb +0 -6
- data/ext/gherkin_lexer_zh_tw/gherkin_lexer_zh_tw.c +0 -1307
- data/features/.cucumber/stepdefs.json +0 -244
- data/features/escaped_pipes.feature +0 -8
- data/features/feature_parser.feature +0 -237
- data/features/json_formatter.feature +0 -498
- data/features/json_parser.feature +0 -331
- data/features/native_lexer.feature +0 -19
- data/features/parser_with_native_lexer.feature +0 -205
- data/features/pretty_formatter.feature +0 -17
- data/features/step_definitions/eyeball_steps.rb +0 -3
- data/features/step_definitions/gherkin_steps.rb +0 -29
- data/features/step_definitions/json_formatter_steps.rb +0 -30
- data/features/step_definitions/json_parser_steps.rb +0 -21
- data/features/step_definitions/pretty_formatter_steps.rb +0 -85
- data/features/steps_parser.feature +0 -46
- data/features/support/env.rb +0 -41
- data/install_mingw_os_x.sh +0 -5
- data/js/.npmignore +0 -1
- data/js/lib/gherkin/lexer/.npmignore +0 -0
- data/lib/gherkin.rb +0 -2
- data/lib/gherkin/README.md +0 -7
- data/lib/gherkin/c_lexer.rb +0 -17
- data/lib/gherkin/formatter/ansi_escapes.rb +0 -97
- data/lib/gherkin/formatter/argument.rb +0 -16
- data/lib/gherkin/formatter/escaping.rb +0 -15
- data/lib/gherkin/formatter/filter_formatter.rb +0 -150
- data/lib/gherkin/formatter/hashable.rb +0 -25
- data/lib/gherkin/formatter/json_formatter.rb +0 -133
- data/lib/gherkin/formatter/line_filter.rb +0 -26
- data/lib/gherkin/formatter/model.rb +0 -281
- data/lib/gherkin/formatter/pretty_formatter.rb +0 -245
- data/lib/gherkin/formatter/regexp_filter.rb +0 -21
- data/lib/gherkin/formatter/step_printer.rb +0 -21
- data/lib/gherkin/formatter/tag_count_formatter.rb +0 -47
- data/lib/gherkin/formatter/tag_filter.rb +0 -19
- data/lib/gherkin/i18n.json +0 -786
- data/lib/gherkin/i18n.rb +0 -176
- data/lib/gherkin/json_parser.rb +0 -177
- data/lib/gherkin/lexer/ar.rb +0 -1170
- data/lib/gherkin/lexer/bg.rb +0 -1382
- data/lib/gherkin/lexer/bm.rb +0 -1250
- data/lib/gherkin/lexer/ca.rb +0 -1310
- data/lib/gherkin/lexer/cs.rb +0 -1246
- data/lib/gherkin/lexer/cy_gb.rb +0 -1032
- data/lib/gherkin/lexer/da.rb +0 -1048
- data/lib/gherkin/lexer/de.rb +0 -1166
- data/lib/gherkin/lexer/el.rb +0 -1628
- data/lib/gherkin/lexer/en.rb +0 -1156
- data/lib/gherkin/lexer/en_au.rb +0 -1486
- data/lib/gherkin/lexer/en_lol.rb +0 -934
- data/lib/gherkin/lexer/en_old.rb +0 -1037
- data/lib/gherkin/lexer/en_pirate.rb +0 -1210
- data/lib/gherkin/lexer/en_scouse.rb +0 -1362
- data/lib/gherkin/lexer/en_tx.rb +0 -1016
- data/lib/gherkin/lexer/encoding.rb +0 -41
- data/lib/gherkin/lexer/eo.rb +0 -995
- data/lib/gherkin/lexer/es.rb +0 -1140
- data/lib/gherkin/lexer/et.rb +0 -990
- data/lib/gherkin/lexer/fa.rb +0 -1214
- data/lib/gherkin/lexer/fi.rb +0 -969
- data/lib/gherkin/lexer/fr.rb +0 -1228
- data/lib/gherkin/lexer/gl.rb +0 -1117
- data/lib/gherkin/lexer/he.rb +0 -1118
- data/lib/gherkin/lexer/hi.rb +0 -1559
- data/lib/gherkin/lexer/hr.rb +0 -1066
- data/lib/gherkin/lexer/hu.rb +0 -1118
- data/lib/gherkin/lexer/i18n_lexer.rb +0 -48
- data/lib/gherkin/lexer/id.rb +0 -963
- data/lib/gherkin/lexer/is.rb +0 -1120
- data/lib/gherkin/lexer/it.rb +0 -1086
- data/lib/gherkin/lexer/ja.rb +0 -1418
- data/lib/gherkin/lexer/kn.rb +0 -1672
- data/lib/gherkin/lexer/ko.rb +0 -1102
- data/lib/gherkin/lexer/lt.rb +0 -1045
- data/lib/gherkin/lexer/lu.rb +0 -1132
- data/lib/gherkin/lexer/lv.rb +0 -1166
- data/lib/gherkin/lexer/nl.rb +0 -1115
- data/lib/gherkin/lexer/no.rb +0 -1060
- data/lib/gherkin/lexer/pa.rb +0 -1852
- data/lib/gherkin/lexer/pl.rb +0 -1457
- data/lib/gherkin/lexer/pt.rb +0 -1430
- data/lib/gherkin/lexer/ro.rb +0 -1164
- data/lib/gherkin/lexer/ru.rb +0 -1766
- data/lib/gherkin/lexer/sk.rb +0 -1452
- data/lib/gherkin/lexer/sr_cyrl.rb +0 -1803
- data/lib/gherkin/lexer/sr_latn.rb +0 -1294
- data/lib/gherkin/lexer/sv.rb +0 -1070
- data/lib/gherkin/lexer/th.rb +0 -2492
- data/lib/gherkin/lexer/tl.rb +0 -1726
- data/lib/gherkin/lexer/tr.rb +0 -1092
- data/lib/gherkin/lexer/tt.rb +0 -1643
- data/lib/gherkin/lexer/uk.rb +0 -1646
- data/lib/gherkin/lexer/uz.rb +0 -1376
- data/lib/gherkin/lexer/vi.rb +0 -1198
- data/lib/gherkin/lexer/zh_cn.rb +0 -1058
- data/lib/gherkin/lexer/zh_tw.rb +0 -1052
- data/lib/gherkin/listener/event.rb +0 -45
- data/lib/gherkin/listener/formatter_listener.rb +0 -150
- data/lib/gherkin/native.rb +0 -7
- data/lib/gherkin/native/java.rb +0 -72
- data/lib/gherkin/native/null.rb +0 -5
- data/lib/gherkin/native/therubyracer.rb +0 -41
- data/lib/gherkin/parser/meta.txt +0 -5
- data/lib/gherkin/parser/parser.rb +0 -166
- data/lib/gherkin/parser/root.txt +0 -11
- data/lib/gherkin/parser/steps.txt +0 -4
- data/lib/gherkin/platform.rb +0 -13
- data/lib/gherkin/rubify.rb +0 -31
- data/lib/gherkin/tag_expression.rb +0 -63
- data/ragel/lexer.c.rl.erb +0 -454
- data/ragel/lexer.java.rl.erb +0 -219
- data/ragel/lexer.js.rl.erb +0 -322
- data/ragel/lexer.rb.rl.erb +0 -179
- data/ragel/lexer_common.rl.erb +0 -50
- data/spec/gherkin/c_lexer_spec.rb +0 -22
- data/spec/gherkin/fixtures/1.feature +0 -8
- data/spec/gherkin/fixtures/comments_in_table.feature +0 -9
- data/spec/gherkin/fixtures/complex.feature +0 -45
- data/spec/gherkin/fixtures/complex.json +0 -139
- data/spec/gherkin/fixtures/complex_for_filtering.feature +0 -60
- data/spec/gherkin/fixtures/complex_with_tags.feature +0 -61
- data/spec/gherkin/fixtures/dos_line_endings.feature +0 -45
- data/spec/gherkin/fixtures/examples_with_only_header.feature +0 -14
- data/spec/gherkin/fixtures/hantu_pisang.feature +0 -35
- data/spec/gherkin/fixtures/i18n_fr.feature +0 -14
- data/spec/gherkin/fixtures/i18n_fr2.feature +0 -8
- data/spec/gherkin/fixtures/i18n_no.feature +0 -7
- data/spec/gherkin/fixtures/i18n_pt1.feature +0 -44
- data/spec/gherkin/fixtures/i18n_pt2.feature +0 -4
- data/spec/gherkin/fixtures/i18n_pt3.feature +0 -4
- data/spec/gherkin/fixtures/i18n_pt4.feature +0 -4
- data/spec/gherkin/fixtures/i18n_zh-CN.feature +0 -9
- data/spec/gherkin/fixtures/iso-8859-1.feature +0 -6
- data/spec/gherkin/fixtures/issue_145.feature +0 -22
- data/spec/gherkin/fixtures/scenario_outline_with_tags.feature +0 -13
- data/spec/gherkin/fixtures/scenario_without_steps.feature +0 -5
- data/spec/gherkin/fixtures/simple_with_comments.feature +0 -7
- data/spec/gherkin/fixtures/simple_with_tags.feature +0 -11
- data/spec/gherkin/fixtures/with_bom.feature +0 -3
- data/spec/gherkin/fixtures/with_bom_and_language_spec.feature +0 -4
- data/spec/gherkin/formatter/ansi_escapes_spec.rb +0 -32
- data/spec/gherkin/formatter/filter_formatter_spec.rb +0 -204
- data/spec/gherkin/formatter/json_formatter_spec.rb +0 -179
- data/spec/gherkin/formatter/model_spec.rb +0 -28
- data/spec/gherkin/formatter/pretty_formatter_spec.rb +0 -184
- data/spec/gherkin/formatter/spaces.feature +0 -9
- data/spec/gherkin/formatter/step_printer_spec.rb +0 -55
- data/spec/gherkin/formatter/tabs.feature +0 -9
- data/spec/gherkin/formatter/tag_count_formatter_spec.rb +0 -30
- data/spec/gherkin/i18n_spec.rb +0 -256
- data/spec/gherkin/java_lexer_spec.rb +0 -20
- data/spec/gherkin/json_parser_spec.rb +0 -165
- data/spec/gherkin/lexer/i18n_lexer_spec.rb +0 -65
- data/spec/gherkin/native_lexer_spec.rb +0 -29
- data/spec/gherkin/parser/parser_spec.rb +0 -16
- data/spec/gherkin/rubify_spec.rb +0 -23
- data/spec/gherkin/sexp_recorder.rb +0 -59
- data/spec/gherkin/shared/doc_string_group.rb +0 -161
- data/spec/gherkin/shared/encoding_group.rb +0 -48
- data/spec/gherkin/shared/lexer_group.rb +0 -589
- data/spec/gherkin/shared/row_group.rb +0 -123
- data/spec/gherkin/shared/tags_group.rb +0 -52
- data/spec/gherkin/tag_expression_spec.rb +0 -146
- data/spec/spec_helper.rb +0 -94
- data/tasks/apidoc.rake +0 -32
- data/tasks/bench.rake +0 -184
- data/tasks/bench/feature_builder.rb +0 -49
- data/tasks/bench/null_listener.rb +0 -4
- data/tasks/compile.rake +0 -83
- data/tasks/cucumber.rake +0 -23
- data/tasks/gems.rake +0 -46
- data/tasks/ikvm.rake +0 -126
- data/tasks/ragel_task.rb +0 -124
- data/tasks/release.rake +0 -34
- data/tasks/rspec.rake +0 -6
- data/tasks/yard/default/layout/html/bubble_32x32.png +0 -0
- data/tasks/yard/default/layout/html/bubble_48x48.png +0 -0
- data/tasks/yard/default/layout/html/footer.erb +0 -5
- data/tasks/yard/default/layout/html/index.erb +0 -1
- data/tasks/yard/default/layout/html/layout.erb +0 -25
- data/tasks/yard/default/layout/html/logo.erb +0 -1
- data/tasks/yard/default/layout/html/setup.rb +0 -4
@@ -1,55 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
require 'gherkin/formatter/step_printer'
|
4
|
-
require 'gherkin/formatter/argument'
|
5
|
-
require 'stringio'
|
6
|
-
|
7
|
-
module Gherkin
|
8
|
-
module Formatter
|
9
|
-
class ParenthesisFormat
|
10
|
-
def text(text)
|
11
|
-
"(#{text})"
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
class BracketFormat
|
16
|
-
def text(text)
|
17
|
-
"[#{text}]"
|
18
|
-
end
|
19
|
-
end
|
20
|
-
|
21
|
-
describe StepPrinter do
|
22
|
-
before do
|
23
|
-
@io = StringIO.new
|
24
|
-
@p = StepPrinter.new
|
25
|
-
@pf = ParenthesisFormat.new
|
26
|
-
@bf = BracketFormat.new
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should replace 0 args" do
|
30
|
-
@p.write_step(@io, @pf, @bf, "I have 10 cukes", [])
|
31
|
-
@io.string.should == "(I have 10 cukes)"
|
32
|
-
end
|
33
|
-
|
34
|
-
it "should replace 1 arg" do
|
35
|
-
@p.write_step(@io, @pf, @bf, "I have 10 cukes", [Argument.new(7, '10')])
|
36
|
-
@io.string.should == "(I have )[10]( cukes)"
|
37
|
-
end
|
38
|
-
|
39
|
-
it "should replace 1 unicode arg" do
|
40
|
-
@p.write_step(@io, @pf, @bf, "I hæve øæ cåkes", [Argument.new(7, 'øæ')])
|
41
|
-
@io.string.should == "(I hæve )[øæ]( cåkes)"
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should replace 2 args" do
|
45
|
-
@p.write_step(@io, @pf, @bf, "I have 10 yellow cukes in my belly", [Argument.new(7, '10'), Argument.new(17, 'cukes')])
|
46
|
-
@io.string.should == "(I have )[10]( yellow )[cukes]( in my belly)"
|
47
|
-
end
|
48
|
-
|
49
|
-
it "should replace 2 unicode args" do
|
50
|
-
@p.write_step(@io, @pf, @bf, "Æslåk likes æøå", [Argument.new(0, 'Æslåk'), Argument.new(12, 'æøå')])
|
51
|
-
@io.string.should == "[Æslåk]( likes )[æøå]"
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|
@@ -1,30 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
require 'gherkin/parser/parser'
|
4
|
-
require 'gherkin/formatter/tag_count_formatter'
|
5
|
-
|
6
|
-
module Gherkin
|
7
|
-
module Formatter
|
8
|
-
describe TagCountFormatter do
|
9
|
-
it "should count tags" do
|
10
|
-
tag_counts = {}
|
11
|
-
dummy = Gherkin::SexpRecorder.new
|
12
|
-
formatter = Gherkin::Formatter::TagCountFormatter.new(dummy, tag_counts)
|
13
|
-
parser = Gherkin::Parser::Parser.new(formatter)
|
14
|
-
|
15
|
-
f = File.new(File.dirname(__FILE__) + "/../fixtures/complex_with_tags.feature").read
|
16
|
-
parser.parse(f, 'f.feature', 0)
|
17
|
-
|
18
|
-
tag_counts.should == {
|
19
|
-
"@hamster" => ["f.feature:58"],
|
20
|
-
"@tag1" => ["f.feature:18","f.feature:23","f.feature:39","f.feature:52","f.feature:58"],
|
21
|
-
"@tag2" => ["f.feature:18","f.feature:23","f.feature:39","f.feature:52","f.feature:58"],
|
22
|
-
"@tag3" => ["f.feature:18", "f.feature:23"],
|
23
|
-
"@tag4" => ["f.feature:18"],
|
24
|
-
"@neat" => ["f.feature:52"],
|
25
|
-
"@more" => ["f.feature:52", "f.feature:58"]
|
26
|
-
}
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
data/spec/gherkin/i18n_spec.rb
DELETED
@@ -1,256 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
module Gherkin
|
5
|
-
module Lexer
|
6
|
-
describe I18n do
|
7
|
-
before do
|
8
|
-
@listener = Gherkin::SexpRecorder.new
|
9
|
-
end
|
10
|
-
|
11
|
-
def scan_file(lexer, file)
|
12
|
-
lexer.scan(File.new(File.dirname(__FILE__) + "/fixtures/" + file).read)
|
13
|
-
end
|
14
|
-
|
15
|
-
it "should recognize keywords in the language of the lexer" do
|
16
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
17
|
-
scan_file(lexer, "i18n_no.feature")
|
18
|
-
@listener.to_sexp.should == [
|
19
|
-
[:comment, "#language:no", 1],
|
20
|
-
[:feature, "Egenskap", "i18n support", "", 2],
|
21
|
-
[:scenario, "Scenario", "Parsing many languages", "", 4],
|
22
|
-
[:step, "Gitt ", "Gherkin supports many languages", 5],
|
23
|
-
[:step, "Når ", "Norwegian keywords are parsed", 6],
|
24
|
-
[:step, "Så ", "they should be recognized", 7],
|
25
|
-
[:eof]
|
26
|
-
]
|
27
|
-
end
|
28
|
-
|
29
|
-
it "should recognize keywords that are a little ambiguous" do
|
30
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
31
|
-
scan_file(lexer, "i18n_fr2.feature")
|
32
|
-
@listener.to_sexp.should == [
|
33
|
-
[:comment, "#language:fr", 1],
|
34
|
-
[:feature, "Fonctionnalité", "i18n", "", 2],
|
35
|
-
[:scenario, "Scénario", "Le French", "", 4],
|
36
|
-
[:step, "Etant donné ", "qqch", 5],
|
37
|
-
[:step, "Etant donnée ", "qqch", 6],
|
38
|
-
[:step, "Etant donnés ", "qqch", 7],
|
39
|
-
[:step, "Etant données ", "qqch", 8],
|
40
|
-
[:eof]
|
41
|
-
]
|
42
|
-
end
|
43
|
-
|
44
|
-
it "should parse languages without a space after keywords" do
|
45
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
46
|
-
scan_file(lexer, "i18n_zh-CN.feature")
|
47
|
-
@listener.to_sexp.should == [
|
48
|
-
[:comment, "#language:zh-CN", 1],
|
49
|
-
[:feature, "功能", "加法", "", 2],
|
50
|
-
[:scenario, "场景", "两个数相加", "", 4],
|
51
|
-
[:step, "假如", "我已经在计算器里输入6", 5],
|
52
|
-
[:step, "而且", "我已经在计算器里输入7", 6],
|
53
|
-
[:step, "当", "我按相加按钮", 7],
|
54
|
-
[:step, "那么", "我应该在屏幕上看到的结果是13", 8],
|
55
|
-
[:eof]
|
56
|
-
]
|
57
|
-
end
|
58
|
-
|
59
|
-
it "should parse languages with spaces after some keywords but not others" do
|
60
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
61
|
-
scan_file(lexer, "i18n_fr.feature")
|
62
|
-
@listener.to_sexp.should == [
|
63
|
-
[:comment, "#language:fr", 1],
|
64
|
-
[:feature, "Fonctionnalité", "Addition", "", 2],
|
65
|
-
[:scenario_outline, "Plan du scénario", "Addition de produits dérivés", "", 3],
|
66
|
-
[:step, "Soit ", "une calculatrice", 4],
|
67
|
-
[:step, "Etant donné ", "qu'on tape <a>", 5],
|
68
|
-
[:step, "Et ", "qu'on tape <b>", 6],
|
69
|
-
[:step, "Lorsqu'", "on tape additionner", 7],
|
70
|
-
[:step, "Alors ", "le résultat doit être <somme>", 8],
|
71
|
-
[:examples, "Exemples", "", "", 10],
|
72
|
-
[:row, %w{a b somme}, 11],
|
73
|
-
[:row, %w{2 2 4}, 12],
|
74
|
-
[:row, %w{2 3 5}, 13],
|
75
|
-
[:eof]
|
76
|
-
]
|
77
|
-
end
|
78
|
-
|
79
|
-
it "should recognize keywords in Portuguese (1st variant)" do
|
80
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
81
|
-
scan_file(lexer, "i18n_pt1.feature")
|
82
|
-
@listener.to_sexp.should == [
|
83
|
-
[:comment, "# language: pt", 1],
|
84
|
-
[:feature, "Funcionalidade", "Reconhece \"Funcionalidade\"", "", 2],
|
85
|
-
[:background, "Contexto", "Reconhece \"Contexto\"", "", 4],
|
86
|
-
[:scenario, "Cenário", "Reconhece \"Cenário\" com acento", "", 6],
|
87
|
-
[:scenario, "Cenario", "Reconhece \"Cenário\" sem acento", "", 8],
|
88
|
-
[:scenario_outline, "Esquema do Cenário", "Reconhece \"Esquema do Cenário\" com acento", "", 10],
|
89
|
-
[:step, "Dado ", "que <Valor> é um valor e que reconhece \"Dado\";", 11],
|
90
|
-
[:step, "Dada ", "a afirmação de que reconhece \"Dada\";", 12],
|
91
|
-
[:step, "Dados ", "os factos acima e ainda que reconhece \"Dados\";", 13],
|
92
|
-
[:step, "Dadas ", "as afirmações acima e ainda que reconhece \"Dadas\";", 14],
|
93
|
-
[:step, "Quando ", "reconhece \"Quando\";", 15],
|
94
|
-
[:step, "Então ", "também reconhece \"Então\" com acento e", 16],
|
95
|
-
[:step, "Entao ", "também reconhece \"Então\" sem acento;", 17],
|
96
|
-
[:step, "E ", "reconhece \"E\";", 18],
|
97
|
-
[:step, "Mas ", "também reconhece \"Mas\".", 19],
|
98
|
-
[:examples, "Exemplos", "Reconhece \"Exemplos\"", "", 21],
|
99
|
-
[:row, ["Valor"], 22],
|
100
|
-
[:row, ["1"], 23],
|
101
|
-
[:scenario_outline, "Esquema do Cenario", "Reconhece \"Esquema do Cenário\" sem acento", "", 25],
|
102
|
-
[:step, "Dado ", "que <Valor> é um valor;", 26],
|
103
|
-
[:examples, "Cenários", "Reconhece \"Cenários\" com acento", "", 28],
|
104
|
-
[:row, ["Valor"], 29],
|
105
|
-
[:row, ["1"], 30],
|
106
|
-
[:scenario_outline, "Delineação do Cenário", "Reconhece \"Delineação do Cenário\" com acento", "", 32],
|
107
|
-
[:step, "Dado ", "que <Valor> é um valor;", 33],
|
108
|
-
[:examples, "Cenarios", "Reconhece \"Cenários\" sem acento", "", 35],
|
109
|
-
[:row, ["Valor"], 36],
|
110
|
-
[:row, ["1"], 37],
|
111
|
-
[:scenario_outline, "Delineacao do Cenario", "Reconhece \"Delineação do Cenário\" sem acento", "", 39],
|
112
|
-
[:step, "Dado ", "que <Valor> é um valor;", 40],
|
113
|
-
[:examples, "Exemplos", "Reconhece \"Exemplos\"", "", 42],
|
114
|
-
[:row, ["Valor"], 43],
|
115
|
-
[:row, ["1"], 44],
|
116
|
-
[:eof]
|
117
|
-
]
|
118
|
-
end
|
119
|
-
|
120
|
-
it "should recognize keywords in Portuguese (2nd variant)" do
|
121
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
122
|
-
scan_file(lexer, "i18n_pt2.feature")
|
123
|
-
@listener.to_sexp.should == [
|
124
|
-
[:comment, "# language: pt", 1],
|
125
|
-
[:feature, "Característica", "Reconhece \"Característica\" com acento", "", 2],
|
126
|
-
[:background, "Cenário de Fundo", "Reconhece \"Cenário de Fundo\" com acento", "", 4],
|
127
|
-
[:eof]
|
128
|
-
]
|
129
|
-
end
|
130
|
-
|
131
|
-
it "should recognize keywords in Portuguese (3rd variant)" do
|
132
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
133
|
-
scan_file(lexer, "i18n_pt3.feature")
|
134
|
-
@listener.to_sexp.should == [
|
135
|
-
[:comment, "# language: pt", 1],
|
136
|
-
[:feature, "Caracteristica", "Reconhece \"Característica\" sem acento", "", 2],
|
137
|
-
[:background, "Cenario de Fundo", "Reconhece \"Cenário de Fundo\" sem acento", "", 4],
|
138
|
-
[:eof]
|
139
|
-
]
|
140
|
-
end
|
141
|
-
|
142
|
-
it "should recognize keywords in Portuguese (4th variant)" do
|
143
|
-
lexer = Gherkin::Lexer::I18nLexer.new(@listener, false)
|
144
|
-
scan_file(lexer, "i18n_pt4.feature")
|
145
|
-
@listener.to_sexp.should == [
|
146
|
-
[:comment, "# language: pt", 1],
|
147
|
-
[:feature, "Característica", "Reconhece \"Característica\" com acento", "", 2],
|
148
|
-
[:background, "Fundo", "Reconhece \"Fundo\"", "", 4],
|
149
|
-
[:eof]
|
150
|
-
]
|
151
|
-
end
|
152
|
-
|
153
|
-
describe 'keywords' do
|
154
|
-
it "should have code keywords without space, comma, exclamation or apostrophe" do
|
155
|
-
['Avast', 'Akkor', 'Etantdonné', 'Lorsque', '假設'].each do |code_keyword|
|
156
|
-
Gherkin::I18n.code_keywords.should include(code_keyword)
|
157
|
-
end
|
158
|
-
end
|
159
|
-
|
160
|
-
it "should reject the bullet stars" do
|
161
|
-
Gherkin::I18n.code_keywords.should_not include('*')
|
162
|
-
end
|
163
|
-
|
164
|
-
it "should report keyword regexp" do
|
165
|
-
Gherkin::I18n.keyword_regexp(:step).should =~ /\|Quando \|Quand \|Quan \|Pryd \|/
|
166
|
-
end
|
167
|
-
|
168
|
-
it "should print available languages" do
|
169
|
-
("\n" + Gherkin::I18n.language_table).should == %{
|
170
|
-
| ar | Arabic | العربية |
|
171
|
-
| bg | Bulgarian | български |
|
172
|
-
| bm | Malay | Bahasa Melayu |
|
173
|
-
| ca | Catalan | català |
|
174
|
-
| cs | Czech | Česky |
|
175
|
-
| cy-GB | Welsh | Cymraeg |
|
176
|
-
| da | Danish | dansk |
|
177
|
-
| de | German | Deutsch |
|
178
|
-
| el | Greek | Ελληνικά |
|
179
|
-
| en | English | English |
|
180
|
-
| en-Scouse | Scouse | Scouse |
|
181
|
-
| en-au | Australian | Australian |
|
182
|
-
| en-lol | LOLCAT | LOLCAT |
|
183
|
-
| en-old | Old English | Englisc |
|
184
|
-
| en-pirate | Pirate | Pirate |
|
185
|
-
| en-tx | Texan | Texan |
|
186
|
-
| eo | Esperanto | Esperanto |
|
187
|
-
| es | Spanish | español |
|
188
|
-
| et | Estonian | eesti keel |
|
189
|
-
| fa | Persian | فارسی |
|
190
|
-
| fi | Finnish | suomi |
|
191
|
-
| fr | French | français |
|
192
|
-
| gl | Galician | galego |
|
193
|
-
| he | Hebrew | עברית |
|
194
|
-
| hi | Hindi | हिंदी |
|
195
|
-
| hr | Croatian | hrvatski |
|
196
|
-
| hu | Hungarian | magyar |
|
197
|
-
| id | Indonesian | Bahasa Indonesia |
|
198
|
-
| is | Icelandic | Íslenska |
|
199
|
-
| it | Italian | italiano |
|
200
|
-
| ja | Japanese | 日本語 |
|
201
|
-
| kn | Kannada | ಕನ್ನಡ |
|
202
|
-
| ko | Korean | 한국어 |
|
203
|
-
| lt | Lithuanian | lietuvių kalba |
|
204
|
-
| lu | Luxemburgish | Lëtzebuergesch |
|
205
|
-
| lv | Latvian | latviešu |
|
206
|
-
| nl | Dutch | Nederlands |
|
207
|
-
| no | Norwegian | norsk |
|
208
|
-
| pa | Panjabi | ਪੰਜਾਬੀ |
|
209
|
-
| pl | Polish | polski |
|
210
|
-
| pt | Portuguese | português |
|
211
|
-
| ro | Romanian | română |
|
212
|
-
| ru | Russian | русский |
|
213
|
-
| sk | Slovak | Slovensky |
|
214
|
-
| sr-Cyrl | Serbian | Српски |
|
215
|
-
| sr-Latn | Serbian (Latin) | Srpski (Latinica) |
|
216
|
-
| sv | Swedish | Svenska |
|
217
|
-
| th | Thai | ไทย |
|
218
|
-
| tl | Telugu | తెలుగు |
|
219
|
-
| tr | Turkish | Türkçe |
|
220
|
-
| tt | Tatar | Татарча |
|
221
|
-
| uk | Ukrainian | Українська |
|
222
|
-
| uz | Uzbek | Узбекча |
|
223
|
-
| vi | Vietnamese | Tiếng Việt |
|
224
|
-
| zh-CN | Chinese simplified | 简体中文 |
|
225
|
-
| zh-TW | Chinese traditional | 繁體中文 |
|
226
|
-
}
|
227
|
-
end
|
228
|
-
|
229
|
-
it "should print keywords for a given language" do
|
230
|
-
("\n" + Gherkin::I18n.get('fr').keyword_table).should == %{
|
231
|
-
| feature | "Fonctionnalité" |
|
232
|
-
| background | "Contexte" |
|
233
|
-
| scenario | "Scénario" |
|
234
|
-
| scenario_outline | "Plan du scénario", "Plan du Scénario" |
|
235
|
-
| examples | "Exemples" |
|
236
|
-
| given | "* ", "Soit ", "Etant donné ", "Etant donnée ", "Etant donnés ", "Etant données ", "Étant donné ", "Étant donnée ", "Étant donnés ", "Étant données " |
|
237
|
-
| when | "* ", "Quand ", "Lorsque ", "Lorsqu'" |
|
238
|
-
| then | "* ", "Alors " |
|
239
|
-
| and | "* ", "Et " |
|
240
|
-
| but | "* ", "Mais " |
|
241
|
-
| given (code) | "Soit", "Etantdonné", "Etantdonnée", "Etantdonnés", "Etantdonnées", "Étantdonné", "Étantdonnée", "Étantdonnés", "Étantdonnées" |
|
242
|
-
| when (code) | "Quand", "Lorsque", "Lorsqu" |
|
243
|
-
| then (code) | "Alors" |
|
244
|
-
| and (code) | "Et" |
|
245
|
-
| but (code) | "Mais" |
|
246
|
-
}
|
247
|
-
end
|
248
|
-
|
249
|
-
it "should not list keywords that start with a number" do
|
250
|
-
Gherkin::I18n.get('en-old').code_keywords.should include("Ðaðe")
|
251
|
-
Gherkin::I18n.get('en-old').code_keywords.should_not include("7")
|
252
|
-
end
|
253
|
-
end
|
254
|
-
end
|
255
|
-
end
|
256
|
-
end
|
@@ -1,20 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
if defined?(JRUBY_VERSION)
|
3
|
-
require 'spec_helper'
|
4
|
-
|
5
|
-
module Gherkin
|
6
|
-
module JavaLexer
|
7
|
-
describe "Java Lexer" do
|
8
|
-
before do
|
9
|
-
@listener = Gherkin::SexpRecorder.new
|
10
|
-
@lexer = Java::GherkinLexer::I18nLexer.new(@listener)
|
11
|
-
end
|
12
|
-
|
13
|
-
it_should_behave_like "a Gherkin lexer"
|
14
|
-
it_should_behave_like "a Gherkin lexer lexing tags"
|
15
|
-
it_should_behave_like "a Gherkin lexer lexing doc_strings"
|
16
|
-
it_should_behave_like "a Gherkin lexer lexing rows"
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,165 +0,0 @@
|
|
1
|
-
#encoding: utf-8
|
2
|
-
require 'stringio'
|
3
|
-
require 'spec_helper'
|
4
|
-
require 'gherkin/json_parser'
|
5
|
-
require 'gherkin/formatter/json_formatter'
|
6
|
-
require 'multi_json'
|
7
|
-
|
8
|
-
module Gherkin
|
9
|
-
describe JSONParser do
|
10
|
-
|
11
|
-
def check_json(json)
|
12
|
-
io = StringIO.new
|
13
|
-
f = Formatter::JSONFormatter.new(io)
|
14
|
-
p = JSONParser.new(f, f)
|
15
|
-
p.parse(json)
|
16
|
-
f.done
|
17
|
-
expected = MultiJson.load(json)
|
18
|
-
actual = MultiJson.load(io.string)
|
19
|
-
|
20
|
-
begin
|
21
|
-
actual.should == expected
|
22
|
-
rescue
|
23
|
-
puts "EXPECTED"
|
24
|
-
puts json
|
25
|
-
puts "ACTUAL"
|
26
|
-
puts io.string
|
27
|
-
puts "======"
|
28
|
-
|
29
|
-
raise
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
|
-
it "should parse a barely empty feature" do
|
34
|
-
check_json(%{[
|
35
|
-
{
|
36
|
-
"id": "one",
|
37
|
-
"uri": "test.feature",
|
38
|
-
"keyword": "Feature",
|
39
|
-
"name": "One",
|
40
|
-
"description": "",
|
41
|
-
"line" : 3
|
42
|
-
}
|
43
|
-
]})
|
44
|
-
end
|
45
|
-
|
46
|
-
it "should parse feature with tags and one scenario" do
|
47
|
-
check_json(%{[
|
48
|
-
{
|
49
|
-
"id": "one",
|
50
|
-
"uri": "test.feature",
|
51
|
-
"tags": [
|
52
|
-
{
|
53
|
-
"name": "@foo",
|
54
|
-
"line": 22
|
55
|
-
}
|
56
|
-
],
|
57
|
-
"keyword": "Feature",
|
58
|
-
"name": "One",
|
59
|
-
"description": "",
|
60
|
-
"line": 3,
|
61
|
-
"elements": [
|
62
|
-
{
|
63
|
-
"id": "one/two",
|
64
|
-
"type": "scenario",
|
65
|
-
"steps": [
|
66
|
-
{
|
67
|
-
"name": "Hello",
|
68
|
-
"rows": [
|
69
|
-
{
|
70
|
-
"cells": ["foo", "bar"]
|
71
|
-
}
|
72
|
-
]
|
73
|
-
}
|
74
|
-
]
|
75
|
-
}
|
76
|
-
]
|
77
|
-
}
|
78
|
-
]})
|
79
|
-
end
|
80
|
-
|
81
|
-
it "should parse feature with match, result and embedding" do
|
82
|
-
check_json(%{
|
83
|
-
[
|
84
|
-
{
|
85
|
-
"id":"one",
|
86
|
-
"uri":"test.feature",
|
87
|
-
"tags":[
|
88
|
-
{
|
89
|
-
"name":"@foo",
|
90
|
-
"line":22
|
91
|
-
}
|
92
|
-
],
|
93
|
-
"keyword":"Feature",
|
94
|
-
"name":"One",
|
95
|
-
"description":"",
|
96
|
-
"line":3,
|
97
|
-
"elements":[
|
98
|
-
{
|
99
|
-
"id":"one/a-scenario",
|
100
|
-
"type":"scenario",
|
101
|
-
"steps":[
|
102
|
-
{
|
103
|
-
"keyword":"Given ",
|
104
|
-
"name":"a passing step",
|
105
|
-
"line":6,
|
106
|
-
"match":{
|
107
|
-
"arguments":[
|
108
|
-
{
|
109
|
-
"offset":22,
|
110
|
-
"val":"cukes"
|
111
|
-
}
|
112
|
-
],
|
113
|
-
"location":"features/step_definitions/steps.rb:1"
|
114
|
-
},
|
115
|
-
"result":{
|
116
|
-
"status":"failed",
|
117
|
-
"error_message":"You suck",
|
118
|
-
"duration":-1
|
119
|
-
},
|
120
|
-
"embeddings":[
|
121
|
-
{
|
122
|
-
"mime_type":"text/plain",
|
123
|
-
"data":"Tm8sIEknbSBub3QgaW50ZXJlc3RlZCBpbiBkZXZlbG9waW5nIGEgcG93ZXJmdWwgYnJhaW4uIEFsbCBJJ20gYWZ0ZXIgaXMganVzdCBhIG1lZGlvY3JlIGJyYWluLCBzb21ldGhpbmcgbGlrZSB0aGUgUHJlc2lkZW50IG9mIHRoZSBBbWVyaWNhbiBUZWxlcGhvbmUgYW5kIFRlbGVncmFwaCBDb21wYW55Lg=="
|
124
|
-
}
|
125
|
-
],
|
126
|
-
"output":[
|
127
|
-
"Hello",
|
128
|
-
"World"
|
129
|
-
]
|
130
|
-
}
|
131
|
-
],
|
132
|
-
"after": [
|
133
|
-
{
|
134
|
-
"match":{
|
135
|
-
"location":"features/step_definitions/hooks.rb:1"
|
136
|
-
},
|
137
|
-
"result":{
|
138
|
-
"status":"passed",
|
139
|
-
"error_message":"Passed after",
|
140
|
-
"duration": 3
|
141
|
-
}
|
142
|
-
},
|
143
|
-
{
|
144
|
-
"match":{
|
145
|
-
"location":"features/step_definitions/hooks.rb:3"
|
146
|
-
},
|
147
|
-
"result":{
|
148
|
-
"status":"failed",
|
149
|
-
"error_message":"Failed After",
|
150
|
-
"duration": 22
|
151
|
-
}
|
152
|
-
}
|
153
|
-
]
|
154
|
-
}
|
155
|
-
]
|
156
|
-
}
|
157
|
-
]
|
158
|
-
})
|
159
|
-
end
|
160
|
-
|
161
|
-
it "shoud parse a complex feature" do
|
162
|
-
check_json('[' + fixture("complex.json") + ']')
|
163
|
-
end
|
164
|
-
end
|
165
|
-
end
|