cucumber 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +0 -5
- data/Gemfile.lock +1 -1
- data/History.md +11 -0
- data/features/background.feature +3 -3
- data/features/tagged_hooks.feature +8 -8
- data/legacy_features/cucumber_cli.feature +3 -3
- data/legacy_features/cucumber_cli_outlines.feature +3 -3
- data/legacy_features/diffing.feature +1 -1
- data/legacy_features/profiles.feature +1 -1
- data/legacy_features/work_in_progress.feature +1 -1
- data/lib/cucumber/ast/step_invocation.rb +6 -4
- data/lib/cucumber/formatter/console.rb +15 -10
- data/lib/cucumber/formatter/pretty.rb +1 -1
- data/lib/cucumber/formatter/progress.rb +1 -1
- data/lib/cucumber/platform.rb +1 -1
- metadata +4 -4
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/History.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## [v1.0.2](https://github.com/cucumber/cucumber/compare/v1.0.1...v1.0.2)
|
2
|
+
|
3
|
+
### Bugfixes
|
4
|
+
* Cucumber 1.0.1 breaks cuke4duke ([#104](https://github.com/cucumber/cucumber/issues/104) Aslak Hellesøy)
|
5
|
+
|
6
|
+
### New Features
|
7
|
+
* Better line truncation if $CUCUMBER_TRUNCATE_OUTPUT has a max line length value. (Aslak Hellesøy)
|
8
|
+
|
9
|
+
### Changes Features
|
10
|
+
* --no-source also excludes location from the summary. (Aslak Hellesøy)
|
11
|
+
|
1
12
|
## [v1.0.1](https://github.com/cucumber/cucumber/compare/v1.0.0...v1.0.1)
|
2
13
|
|
3
14
|
### Bugfixes
|
data/features/background.feature
CHANGED
@@ -299,7 +299,7 @@ Feature: Background
|
|
299
299
|
Then I should have '10' cukes
|
300
300
|
|
301
301
|
Failing Scenarios:
|
302
|
-
cucumber features/failing_background.feature:7
|
302
|
+
cucumber features/failing_background.feature:7
|
303
303
|
|
304
304
|
2 scenarios (1 failed, 1 skipped)
|
305
305
|
6 steps (1 failed, 5 skipped)
|
@@ -335,7 +335,7 @@ Feature: Background
|
|
335
335
|
| 10 |
|
336
336
|
|
337
337
|
Failing Scenarios:
|
338
|
-
cucumber features/scenario_outline_failing_background.feature:6
|
338
|
+
cucumber features/scenario_outline_failing_background.feature:6
|
339
339
|
|
340
340
|
2 scenarios (1 failed, 1 skipped)
|
341
341
|
4 steps (1 failed, 3 skipped)
|
@@ -386,7 +386,7 @@ Feature: Background
|
|
386
386
|
Then I should have '10' global cukes
|
387
387
|
|
388
388
|
Failing Scenarios:
|
389
|
-
cucumber features/failing_background_after_success.feature:10
|
389
|
+
cucumber features/failing_background_after_success.feature:10
|
390
390
|
|
391
391
|
2 scenarios (1 failed, 1 passed)
|
392
392
|
6 steps (1 failed, 1 skipped, 4 passed)
|
@@ -58,9 +58,9 @@ Feature: Tag logic
|
|
58
58
|
Scenario: And yet another Example
|
59
59
|
|
60
60
|
Failing Scenarios:
|
61
|
-
cucumber features/tagulicious.feature:4
|
62
|
-
cucumber features/tagulicious.feature:8
|
63
|
-
cucumber features/tagulicious.feature:12
|
61
|
+
cucumber features/tagulicious.feature:4
|
62
|
+
cucumber features/tagulicious.feature:8
|
63
|
+
cucumber features/tagulicious.feature:12
|
64
64
|
|
65
65
|
4 scenarios (3 failed, 1 passed)
|
66
66
|
3 steps (3 undefined)
|
@@ -97,7 +97,7 @@ Feature: Tag logic
|
|
97
97
|
Scenario: And yet another Example
|
98
98
|
|
99
99
|
Failing Scenarios:
|
100
|
-
cucumber features/tagulicious.feature:4
|
100
|
+
cucumber features/tagulicious.feature:4
|
101
101
|
|
102
102
|
4 scenarios (1 failed, 2 undefined, 1 passed)
|
103
103
|
3 steps (3 undefined)
|
@@ -170,9 +170,9 @@ Feature: Tag logic
|
|
170
170
|
Scenario: And yet another Example
|
171
171
|
|
172
172
|
Failing Scenarios:
|
173
|
-
cucumber features/tagulicious.feature:4
|
174
|
-
cucumber features/tagulicious.feature:8
|
175
|
-
cucumber features/tagulicious.feature:12
|
173
|
+
cucumber features/tagulicious.feature:4
|
174
|
+
cucumber features/tagulicious.feature:8
|
175
|
+
cucumber features/tagulicious.feature:12
|
176
176
|
|
177
177
|
4 scenarios (3 failed, 1 passed)
|
178
178
|
3 steps (3 undefined)
|
@@ -209,7 +209,7 @@ Feature: Tag logic
|
|
209
209
|
Scenario: And yet another Example
|
210
210
|
|
211
211
|
Failing Scenarios:
|
212
|
-
cucumber features/tagulicious.feature:4
|
212
|
+
cucumber features/tagulicious.feature:4
|
213
213
|
|
214
214
|
4 scenarios (1 failed, 2 undefined, 1 passed)
|
215
215
|
3 steps (3 undefined)
|
@@ -82,7 +82,7 @@ Feature: Cucumber command line
|
|
82
82
|
features/sample.feature:18:in `Given failing'
|
83
83
|
|
84
84
|
Failing Scenarios:
|
85
|
-
cucumber features/sample.feature:17
|
85
|
+
cucumber features/sample.feature:17
|
86
86
|
|
87
87
|
2 scenarios (1 failed, 1 undefined)
|
88
88
|
2 steps (1 failed, 1 undefined)
|
@@ -160,7 +160,7 @@ Feature: Cucumber command line
|
|
160
160
|
features/sample.feature:18:in `Given failing'
|
161
161
|
|
162
162
|
Failing Scenarios:
|
163
|
-
cucumber features/sample.feature:17
|
163
|
+
cucumber features/sample.feature:17
|
164
164
|
|
165
165
|
3 scenarios (1 failed, 1 undefined, 1 passed)
|
166
166
|
3 steps (1 failed, 1 undefined, 1 passed)
|
@@ -464,7 +464,7 @@ Feature: Cucumber command line
|
|
464
464
|
features/sample.feature:18:in `Given failing'
|
465
465
|
|
466
466
|
Failing Scenarios:
|
467
|
-
cucumber features/sample.feature:17
|
467
|
+
cucumber features/sample.feature:17
|
468
468
|
|
469
469
|
3 scenarios (1 failed, 1 undefined, 1 passed)
|
470
470
|
3 steps (1 failed, 1 undefined, 1 passed)
|
@@ -27,7 +27,7 @@ Feature: Cucumber command line
|
|
27
27
|
| passing | passing |
|
28
28
|
|
29
29
|
Failing Scenarios:
|
30
|
-
cucumber features/outline_sample.feature:5
|
30
|
+
cucumber features/outline_sample.feature:5
|
31
31
|
|
32
32
|
4 scenarios (1 failed, 1 undefined, 2 passed)
|
33
33
|
8 steps (1 failed, 2 skipped, 1 undefined, 4 passed)
|
@@ -59,7 +59,7 @@ Feature: Cucumber command line
|
|
59
59
|
| passing | passing |
|
60
60
|
|
61
61
|
Failing Scenarios:
|
62
|
-
cucumber features/outline_sample.feature:5
|
62
|
+
cucumber features/outline_sample.feature:5
|
63
63
|
|
64
64
|
4 scenarios (1 failed, 1 undefined, 2 passed)
|
65
65
|
8 steps (1 failed, 2 skipped, 1 undefined, 4 passed)
|
@@ -108,7 +108,7 @@ Feature: Cucumber command line
|
|
108
108
|
features/outline_sample.feature:6:in `Given <state> without a table'
|
109
109
|
|
110
110
|
Failing Scenarios:
|
111
|
-
cucumber features/outline_sample.feature:5
|
111
|
+
cucumber features/outline_sample.feature:5
|
112
112
|
|
113
113
|
5 scenarios (1 failed, 1 undefined, 3 passed)
|
114
114
|
8 steps (1 failed, 2 skipped, 1 undefined, 4 passed)
|
@@ -17,7 +17,7 @@ Feature: Cucumber command line
|
|
17
17
|
features/failing_expectation.feature:4:in `Given failing expectation'
|
18
18
|
|
19
19
|
Failing Scenarios:
|
20
|
-
cucumber features/failing_expectation.feature:3
|
20
|
+
cucumber features/failing_expectation.feature:3
|
21
21
|
|
22
22
|
1 scenario (1 failed)
|
23
23
|
1 step (1 failed)
|
@@ -118,21 +118,23 @@ module Cucumber
|
|
118
118
|
end
|
119
119
|
end
|
120
120
|
|
121
|
+
# This constant is appended to by Cuke4Duke. Do not change its name
|
122
|
+
BACKTRACE_FILTER_PATTERNS = [/vendor\/rails|lib\/cucumber|bin\/cucumber:|lib\/rspec|gems\/|minitest|test\/unit/]
|
121
123
|
PWD_PATTERN = /#{Regexp.escape(Dir.pwd)}\//m
|
122
|
-
BACKTRACE_FILTER_PATTERN = /vendor\/rails|lib\/cucumber|bin\/cucumber:|lib\/rspec|gems\/|minitest|test\/unit/
|
123
|
-
IN_PATTERN = /(.*):in `/
|
124
124
|
|
125
|
+
# This is to work around double ":in " segments in JRuby backtraces. JRuby bug?
|
125
126
|
def filter_backtrace(e)
|
126
127
|
return e if Cucumber.use_full_backtrace
|
127
128
|
e.backtrace.each{|line| line.gsub!(PWD_PATTERN, "./")}
|
128
129
|
|
129
130
|
filtered = (e.backtrace || []).reject do |line|
|
130
|
-
line =~
|
131
|
+
BACKTRACE_FILTER_PATTERNS.detect { |p| line =~ p }
|
131
132
|
end
|
132
133
|
|
133
134
|
if ENV['CUCUMBER_TRUNCATE_OUTPUT']
|
135
|
+
# Strip off file locations
|
134
136
|
filtered = filtered.map do |line|
|
135
|
-
line =~
|
137
|
+
line =~ /(.*):in `/ ? $1 : line
|
136
138
|
end
|
137
139
|
end
|
138
140
|
|
@@ -59,21 +59,16 @@ module Cucumber
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
def
|
63
|
-
STDERR.puts("The #print_counts method is deprecated and will be removed in 0.4. Use #print_stats instead")
|
64
|
-
print_stats(nil)
|
65
|
-
end
|
66
|
-
|
67
|
-
def print_stats(features, profiles = [])
|
62
|
+
def print_stats(features, options)
|
68
63
|
@failures = step_mother.scenarios(:failed).select { |s| s.is_a?(Cucumber::Ast::Scenario) || s.is_a?(Cucumber::Ast::OutlineTable::ExampleRow) }
|
69
64
|
@failures.collect! { |s| (s.is_a?(Cucumber::Ast::OutlineTable::ExampleRow)) ? s.scenario_outline : s }
|
70
65
|
|
71
66
|
if !@failures.empty?
|
72
67
|
@io.puts format_string("Failing Scenarios:", :failed)
|
73
68
|
@failures.each do |failure|
|
74
|
-
profiles_string =
|
75
|
-
|
76
|
-
format_string(" #
|
69
|
+
profiles_string = options.custom_profiles.empty? ? '' : (options.custom_profiles.map{|profile| "-p #{profile}" }).join(' ') + ' '
|
70
|
+
source = options[:source] ? format_string(" # Scenario: " + failure.name, :comment) : ''
|
71
|
+
@io.puts format_string("cucumber #{profiles_string}" + failure.file_colon_line, :failed) + source
|
77
72
|
end
|
78
73
|
@io.puts
|
79
74
|
end
|
@@ -87,9 +82,19 @@ module Cucumber
|
|
87
82
|
end
|
88
83
|
|
89
84
|
def print_exception(e, status, indent)
|
90
|
-
|
85
|
+
message = "#{e.message} (#{e.class})"
|
86
|
+
if ENV['CUCUMBER_TRUNCATE_OUTPUT']
|
87
|
+
message = linebreaks(message, ENV['CUCUMBER_TRUNCATE_OUTPUT'].to_i)
|
88
|
+
end
|
89
|
+
|
90
|
+
string = "#{message}\n#{e.backtrace.join("\n")}".indent(indent)
|
91
91
|
@io.puts(format_string(string, status))
|
92
92
|
end
|
93
|
+
|
94
|
+
# http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/10655
|
95
|
+
def linebreaks(s, max)
|
96
|
+
s.gsub(/.{1,#{max}}(?:\s|\Z)/){($& + 5.chr).gsub(/\n\005/,"\n").gsub(/\005/,"\n")}.rstrip
|
97
|
+
end
|
93
98
|
|
94
99
|
def print_snippets(options)
|
95
100
|
return unless options[:snippets]
|
data/lib/cucumber/platform.rb
CHANGED
@@ -4,7 +4,7 @@ require 'rbconfig'
|
|
4
4
|
|
5
5
|
module Cucumber
|
6
6
|
unless defined?(Cucumber::VERSION)
|
7
|
-
VERSION = '1.0.
|
7
|
+
VERSION = '1.0.2'
|
8
8
|
BINARY = File.expand_path(File.dirname(__FILE__) + '/../../bin/cucumber')
|
9
9
|
LIBDIR = File.expand_path(File.dirname(__FILE__) + '/../../lib')
|
10
10
|
JRUBY = defined?(JRUBY_VERSION)
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cucumber
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- "Aslak Helles\xC3\xB8y"
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-07-
|
13
|
+
date: 2011-07-17 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gherkin
|
@@ -831,7 +831,7 @@ licenses: []
|
|
831
831
|
|
832
832
|
post_install_message: "\n\
|
833
833
|
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n\
|
834
|
-
Thank you for installing cucumber-1.0.
|
834
|
+
Thank you for installing cucumber-1.0.2.\n\
|
835
835
|
Please be sure to read http://wiki.github.com/cucumber/cucumber/upgrading\n\
|
836
836
|
for important information about this release. Happy cuking!\n\n\
|
837
837
|
(::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::) (::)\n\n"
|
@@ -857,7 +857,7 @@ rubyforge_project:
|
|
857
857
|
rubygems_version: 1.8.5
|
858
858
|
signing_key:
|
859
859
|
specification_version: 3
|
860
|
-
summary: cucumber-1.0.
|
860
|
+
summary: cucumber-1.0.2
|
861
861
|
test_files:
|
862
862
|
- features/background.feature
|
863
863
|
- features/bootstrap.feature
|