cucumber 0.3.11 → 0.3.90
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/History.txt +101 -0
- data/Manifest.txt +14 -5
- data/config/hoe.rb +1 -2
- data/cucumber.yml +1 -0
- data/examples/i18n/ar/Rakefile +1 -1
- data/examples/i18n/ar/features/addition.feature +1 -0
- data/examples/i18n/bg/Rakefile +1 -1
- data/examples/i18n/bg/features/addition.feature +1 -0
- data/examples/i18n/bg/features/consecutive_calculations.feature +1 -0
- data/examples/i18n/bg/features/division.feature +1 -0
- data/examples/i18n/cat/Rakefile +1 -1
- data/examples/i18n/cat/features/suma.feature +1 -0
- data/examples/i18n/da/Rakefile +1 -1
- data/examples/i18n/da/features/summering.feature +1 -0
- data/examples/i18n/de/Rakefile +1 -1
- data/examples/i18n/de/features/addition.feature +1 -0
- data/examples/i18n/de/features/division.feature +1 -0
- data/examples/i18n/en-lol/features/stuffing.feature +1 -1
- data/examples/i18n/en/Rakefile +1 -1
- data/examples/i18n/en/features/addition.feature +1 -0
- data/examples/i18n/en/features/division.feature +1 -0
- data/examples/i18n/es/Rakefile +1 -1
- data/examples/i18n/es/features/adicion.feature +1 -0
- data/examples/i18n/et/Rakefile +1 -1
- data/examples/i18n/et/features/jagamine.feature +1 -0
- data/examples/i18n/et/features/liitmine.feature +1 -0
- data/examples/i18n/fi/Rakefile +1 -1
- data/examples/i18n/fi/features/jakolasku.feature +1 -0
- data/examples/i18n/fr/Rakefile +1 -1
- data/examples/i18n/fr/features/addition.feature +2 -1
- data/examples/i18n/he/Rakefile +1 -1
- data/examples/i18n/he/features/addition.feature +1 -0
- data/examples/i18n/he/features/division.feature +1 -0
- data/examples/i18n/hu/Rakefile +1 -1
- data/examples/i18n/hu/features/addition.feature +1 -0
- data/examples/i18n/hu/features/division.feature +1 -0
- data/examples/i18n/id/Rakefile +1 -1
- data/examples/i18n/id/features/addition.feature +1 -0
- data/examples/i18n/id/features/division.feature +1 -0
- data/examples/i18n/it/Rakefile +1 -1
- data/examples/i18n/it/features/somma.feature +1 -0
- data/examples/i18n/ja/Rakefile +1 -1
- data/examples/i18n/ja/features/addition.feature +1 -0
- data/examples/i18n/ja/features/division.feature +1 -0
- data/examples/i18n/ko/Rakefile +1 -1
- data/examples/i18n/ko/features/addition.feature +6 -5
- data/examples/i18n/ko/features/division.feature +1 -0
- data/examples/i18n/ko/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/lt/Rakefile +1 -1
- data/examples/i18n/lt/features/addition.feature +1 -0
- data/examples/i18n/lt/features/division.feature +1 -0
- data/examples/i18n/lv/Rakefile +1 -1
- data/examples/i18n/lv/features/addition.feature +1 -0
- data/examples/i18n/lv/features/division.feature +1 -0
- data/examples/i18n/no/Rakefile +1 -1
- data/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +1 -1
- data/examples/i18n/no/features/summering.feature +1 -0
- data/examples/i18n/pl/Rakefile +1 -1
- data/examples/i18n/pl/features/addition.feature +1 -0
- data/examples/i18n/pl/features/division.feature +1 -0
- data/examples/i18n/pt/Rakefile +1 -1
- data/examples/i18n/pt/features/adicao.feature +1 -0
- data/examples/i18n/ro/Rakefile +1 -1
- data/examples/i18n/ro/features/suma.feature +1 -0
- data/examples/i18n/ru/Rakefile +1 -1
- data/examples/i18n/ru/features/addition.feature +1 -0
- data/examples/i18n/ru/features/consecutive_calculations.feature +1 -0
- data/examples/i18n/ru/features/division.feature +1 -0
- data/examples/i18n/se/Rakefile +1 -1
- data/examples/i18n/se/features/summering.feature +1 -0
- data/examples/i18n/sk/Rakefile +1 -1
- data/examples/i18n/sk/features/addition.feature +1 -0
- data/examples/i18n/sk/features/division.feature +1 -0
- data/examples/i18n/zh-CN/features/addition.feature +1 -0
- data/examples/i18n/zh-TW/features/addition.feature +1 -0
- data/examples/i18n/zh-TW/features/division.feature +1 -0
- data/examples/self_test/features/support/env.rb +2 -1
- data/examples/sinatra/features/step_definitions/add_steps.rb +1 -1
- data/examples/sinatra/features/support/env.rb +13 -5
- data/examples/steps_library/features/step_definitions/steps_lib1.rb +8 -0
- data/examples/steps_library/features/step_definitions/steps_lib2.rb +8 -0
- data/examples/tickets/features/step_definitons/tickets_steps.rb +15 -0
- data/examples/tickets/features/table_diffing.feature +13 -0
- data/features/after_block_exceptions.feature +4 -1
- data/features/after_step_block_exceptions.feature +4 -1
- data/features/background.feature +6 -0
- data/features/bug_371.feature +32 -0
- data/features/cucumber_cli.feature +11 -1
- data/features/cucumber_cli_diff_disabled.feature +9 -2
- data/features/drb_server_integration.feature +28 -5
- data/features/expand.feature +2 -1
- data/features/html_formatter/a.html +129 -1614
- data/features/junit_formatter.feature +4 -4
- data/features/language_from_header.feature +30 -0
- data/features/rake_task.feature +28 -0
- data/features/step_definitions/cucumber_steps.rb +2 -2
- data/features/steps_formatter.feature +25 -0
- data/features/support/env.rb +13 -5
- data/features/table_diffing.feature +45 -0
- data/features/unicode_table.feature +35 -0
- data/features/work_in_progress.feature +3 -0
- data/gem_tasks/sass.rake +4 -0
- data/lib/cucumber.rb +0 -57
- data/lib/cucumber/ast/comment.rb +1 -1
- data/lib/cucumber/ast/feature.rb +2 -2
- data/lib/cucumber/ast/feature_element.rb +4 -0
- data/lib/cucumber/ast/outline_table.rb +2 -1
- data/lib/cucumber/ast/py_string.rb +0 -1
- data/lib/cucumber/ast/scenario.rb +5 -3
- data/lib/cucumber/ast/scenario_outline.rb +6 -1
- data/lib/cucumber/ast/step.rb +8 -1
- data/lib/cucumber/ast/step_invocation.rb +6 -1
- data/lib/cucumber/ast/table.rb +287 -49
- data/lib/cucumber/ast/visitor.rb +2 -1
- data/lib/cucumber/cli/configuration.rb +45 -28
- data/lib/cucumber/cli/drb_client.rb +8 -9
- data/lib/cucumber/cli/language_help_formatter.rb +9 -7
- data/lib/cucumber/cli/main.rb +8 -9
- data/lib/cucumber/feature_file.rb +53 -0
- data/lib/cucumber/filter.rb +50 -0
- data/lib/cucumber/formatter/console.rb +12 -0
- data/lib/cucumber/formatter/cucumber.css +106 -48
- data/lib/cucumber/formatter/cucumber.sass +121 -31
- data/lib/cucumber/formatter/html.rb +6 -5
- data/lib/cucumber/formatter/junit.rb +3 -6
- data/lib/cucumber/formatter/pretty.rb +22 -9
- data/lib/cucumber/formatter/profile.rb +1 -1
- data/lib/cucumber/formatter/progress.rb +1 -1
- data/lib/cucumber/formatter/steps.rb +49 -0
- data/lib/cucumber/languages.yml +3 -3
- data/lib/cucumber/parser.rb +1 -33
- data/lib/cucumber/parser/feature.rb +39 -16
- data/lib/cucumber/parser/feature.tt +1 -3
- data/lib/cucumber/parser/i18n.tt +30 -23
- data/lib/cucumber/parser/i18n/language.rb +83 -0
- data/lib/cucumber/parser/treetop_ext.rb +12 -83
- data/lib/cucumber/platform.rb +6 -0
- data/lib/cucumber/rake/task.rb +6 -0
- data/lib/cucumber/step_definition.rb +6 -0
- data/lib/cucumber/step_match.rb +1 -1
- data/lib/cucumber/step_mother.rb +3 -3
- data/lib/cucumber/version.rb +1 -1
- data/lib/cucumber/webrat/table_locator.rb +66 -0
- data/rails_generators/cucumber/templates/cucumber.rake +4 -0
- data/rails_generators/cucumber/templates/env.rb +1 -0
- data/rails_generators/cucumber/templates/spork_env.rb +1 -1
- data/rails_generators/cucumber/templates/webrat_steps.rb +17 -0
- data/rails_generators/feature/templates/feature.erb +1 -1
- data/rails_generators/feature/templates/steps.erb +2 -8
- data/spec/cucumber/ast/step_collection_spec.rb +5 -4
- data/spec/cucumber/ast/table_spec.rb +145 -0
- data/spec/cucumber/cli/configuration_spec.rb +55 -9
- data/spec/cucumber/cli/drb_client_spec.rb +5 -4
- data/spec/cucumber/cli/main_spec.rb +9 -12
- data/spec/cucumber/formatter/progress_spec.rb +2 -2
- data/spec/cucumber/parser/feature_parser_spec.rb +11 -9
- data/spec/cucumber/parser/table_parser_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -1
- metadata +21 -20
- data/spec/cucumber/formatter/html/cucumber.css +0 -37
- data/spec/cucumber/formatter/html/cucumber.js +0 -13
- data/spec/cucumber/formatter/html/index.html +0 -45
- data/spec/cucumber/formatter/html/jquery-1.3.min.js +0 -19
- data/spec/cucumber/formatter/html/jquery.uitableedit.js +0 -100
data/examples/i18n/it/Rakefile
CHANGED
data/examples/i18n/ja/Rakefile
CHANGED
data/examples/i18n/ko/Rakefile
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
+
# language: ko
|
|
1
2
|
기능: 덧셈
|
|
2
3
|
예기치못한 실수을 방지하기 위해
|
|
3
4
|
수학을 잘 못하는 사람으로써
|
|
4
5
|
두숫자의 합을 알고 싶다
|
|
5
6
|
|
|
6
|
-
|
|
7
|
-
조건 계산기에
|
|
8
|
-
그리고 계산기에
|
|
9
|
-
만일 내가
|
|
10
|
-
그러면 화면에 출력된 결과는
|
|
7
|
+
시나리오 개요: 두 숫자를 더하기
|
|
8
|
+
조건 계산기에 <입력1>을 입력했음
|
|
9
|
+
그리고 계산기에 <입력2>을 입력했음
|
|
10
|
+
만일 내가 <버튼>를 누르면
|
|
11
|
+
그러면 화면에 출력된 결과는 <결과>이다
|
|
11
12
|
|
|
12
13
|
예:
|
|
13
14
|
| 입력1 | 입력2 | 버튼 | 결과 |
|
data/examples/i18n/lt/Rakefile
CHANGED
data/examples/i18n/lv/Rakefile
CHANGED
data/examples/i18n/no/Rakefile
CHANGED
data/examples/i18n/pl/Rakefile
CHANGED
data/examples/i18n/pt/Rakefile
CHANGED
data/examples/i18n/ro/Rakefile
CHANGED
data/examples/i18n/ru/Rakefile
CHANGED
data/examples/i18n/se/Rakefile
CHANGED
data/examples/i18n/sk/Rakefile
CHANGED
|
@@ -7,14 +7,22 @@ require app_file
|
|
|
7
7
|
# Force the application name because polyglot breaks the auto-detection logic.
|
|
8
8
|
Sinatra::Application.app_file = app_file
|
|
9
9
|
|
|
10
|
-
# RSpec
|
|
11
10
|
require 'spec/expectations'
|
|
12
11
|
|
|
13
|
-
# Webrat
|
|
14
12
|
require 'webrat'
|
|
15
13
|
Webrat.configure do |config|
|
|
16
|
-
config.mode = :
|
|
14
|
+
config.mode = :rack
|
|
17
15
|
end
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
class MyWorld
|
|
18
|
+
include Webrat::Methods
|
|
19
|
+
include Webrat::Matchers
|
|
20
|
+
|
|
21
|
+
Webrat::Methods.delegate_to_session :response_code, :response_body
|
|
22
|
+
|
|
23
|
+
def app
|
|
24
|
+
Sinatra::Application
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
World{MyWorld.new}
|
|
@@ -64,3 +64,18 @@ end
|
|
|
64
64
|
Then /^I should get a no method error for 'backtrace_line'$/ do
|
|
65
65
|
pending
|
|
66
66
|
end
|
|
67
|
+
|
|
68
|
+
Then /the table should be different with table:/ do |expected|
|
|
69
|
+
expected.diff!(table(%{
|
|
70
|
+
| b | c | a | d |
|
|
71
|
+
| KASHA | AIIT | BOOYA | X |
|
|
72
|
+
| four | five | three | Y |
|
|
73
|
+
}), :coldiff => true)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
Then /the table should be different with array:/ do |expected|
|
|
77
|
+
expected.diff!([
|
|
78
|
+
{'a' => 'BOOYA', 'b' => 'KASHA'},
|
|
79
|
+
{'a' => 'three', 'b' => 'four'},
|
|
80
|
+
])
|
|
81
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
@intentional_failure
|
|
2
|
+
Feature: Tables
|
|
3
|
+
Scenario: Extra row with table
|
|
4
|
+
Then the table should be different with table:
|
|
5
|
+
| a | b |
|
|
6
|
+
| one | two |
|
|
7
|
+
| three | four |
|
|
8
|
+
|
|
9
|
+
Scenario: Extra row and missing column with table
|
|
10
|
+
Then the table should be different with table:
|
|
11
|
+
| a | e | b |
|
|
12
|
+
| one | Q | two |
|
|
13
|
+
| three | R | four |
|
|
@@ -48,7 +48,10 @@ Feature: After Block Exceptions
|
|
|
48
48
|
|
|
49
49
|
Scenario: Success # features/naughty_step_in_scenario.feature:6
|
|
50
50
|
Given this step works # features/step_definitions/steps.rb:5
|
|
51
|
-
|
|
51
|
+
|
|
52
|
+
Failing Scenarios:
|
|
53
|
+
cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Naughty Step
|
|
54
|
+
|
|
52
55
|
2 scenarios (1 failed, 1 passed)
|
|
53
56
|
2 steps (2 passed)
|
|
54
57
|
|
|
@@ -49,7 +49,10 @@ Feature: AfterStep Block Exceptions
|
|
|
49
49
|
|
|
50
50
|
Scenario: Success # features/naughty_step_in_scenario.feature:6
|
|
51
51
|
Given this step works # features/step_definitions/steps.rb:5
|
|
52
|
-
|
|
52
|
+
|
|
53
|
+
Failing Scenarios:
|
|
54
|
+
cucumber features/naughty_step_in_scenario.feature:3 # Scenario: Naughty Step
|
|
55
|
+
|
|
53
56
|
2 scenarios (1 failed, 1 passed)
|
|
54
57
|
2 steps (1 failed, 1 passed)
|
|
55
58
|
|
data/features/background.feature
CHANGED
|
@@ -112,6 +112,9 @@ Feature: backgrounds
|
|
|
112
112
|
Scenario: another failing background
|
|
113
113
|
Then I should have '10' cukes
|
|
114
114
|
|
|
115
|
+
Failing Scenarios:
|
|
116
|
+
cucumber features/background/failing_background.feature:8 # Scenario: failing background
|
|
117
|
+
|
|
115
118
|
2 scenarios (1 failed, 1 skipped)
|
|
116
119
|
6 steps (1 failed, 5 skipped)
|
|
117
120
|
|
|
@@ -193,6 +196,9 @@ Feature: backgrounds
|
|
|
193
196
|
features/background/failing_background_after_success.feature:5:in `And '10' global cukes'
|
|
194
197
|
Then I should have '10' global cukes
|
|
195
198
|
|
|
199
|
+
Failing Scenarios:
|
|
200
|
+
cucumber features/background/failing_background_after_success.feature:10 # Scenario: failing background
|
|
201
|
+
|
|
196
202
|
2 scenarios (1 failed, 1 passed)
|
|
197
203
|
6 steps (1 failed, 1 skipped, 4 passed)
|
|
198
204
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Feature: https://rspec.lighthouseapp.com/projects/16211/tickets/371
|
|
2
|
+
Scenario: Before runs once
|
|
3
|
+
Given a standard Cucumber project directory structure
|
|
4
|
+
And a file named "features/f.feature" with:
|
|
5
|
+
"""
|
|
6
|
+
Feature: F
|
|
7
|
+
Scenario: S
|
|
8
|
+
Given G
|
|
9
|
+
"""
|
|
10
|
+
And a file named "features/step_definitions/steps.rb" with:
|
|
11
|
+
"""
|
|
12
|
+
Before do
|
|
13
|
+
puts "B"
|
|
14
|
+
end
|
|
15
|
+
Given /G/ do
|
|
16
|
+
puts "G"
|
|
17
|
+
end
|
|
18
|
+
"""
|
|
19
|
+
When I run cucumber -q --format pretty --format progress --out progress.txt features/f.feature
|
|
20
|
+
Then it should pass with
|
|
21
|
+
"""
|
|
22
|
+
Feature: F
|
|
23
|
+
|
|
24
|
+
Scenario: S
|
|
25
|
+
B
|
|
26
|
+
G
|
|
27
|
+
Given G
|
|
28
|
+
|
|
29
|
+
1 scenario (1 passed)
|
|
30
|
+
1 step (1 passed)
|
|
31
|
+
|
|
32
|
+
"""
|