cucumber 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.rspec +1 -1
- data/Caliper.yml +4 -0
- data/History.txt +1557 -0
- data/LICENSE +1 -1
- data/README.rdoc +26 -0
- data/Rakefile +51 -5
- data/VERSION.yml +5 -0
- data/bin/cucumber +1 -7
- data/cucumber.gemspec +77 -3
- data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
- data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +7 -4
- data/examples/i18n/ro/features/suma.feature +11 -0
- data/examples/i18n/ru/features/division.feature +2 -2
- data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +3 -3
- data/examples/sinatra/features/support/env.rb +5 -2
- data/examples/v8/features/fibonacci.feature +1 -1
- data/examples/watir/features/step_definitions/search_steps.rb +1 -1
- data/features/announce.feature +164 -0
- data/features/around_hooks.feature +232 -0
- data/features/background.feature +95 -284
- data/features/bug_371.feature +32 -0
- data/features/bug_464.feature +16 -0
- data/features/bug_475.feature +42 -0
- data/features/bug_585_tab_indentation.feature +22 -0
- data/features/bug_600.feature +67 -0
- data/features/call_steps_from_stepdefs.feature +154 -0
- data/features/cucumber_cli.feature +591 -0
- data/features/cucumber_cli_outlines.feature +117 -0
- data/features/custom_formatter.feature +73 -3
- data/features/default_snippets.feature +42 -0
- data/features/diffing.feature +25 -0
- data/features/drb_server_integration.feature +174 -0
- data/features/exception_in_after_block.feature +127 -0
- data/features/exception_in_after_step_block.feature +104 -0
- data/features/exception_in_before_block.feature +98 -0
- data/features/exclude_files.feature +20 -0
- data/features/expand.feature +60 -0
- data/features/html_formatter.feature +8 -0
- data/features/html_formatter/a.html +582 -0
- data/features/json_formatter.feature +245 -160
- data/features/junit_formatter.feature +88 -0
- data/features/language_from_header.feature +30 -0
- data/features/language_help.feature +78 -0
- data/features/listener_debugger_formatter.feature +42 -0
- data/features/multiline_names.feature +44 -0
- data/features/negative_tagged_hooks.feature +60 -0
- data/features/post_configuration_hook.feature +37 -0
- data/features/profiles.feature +126 -0
- data/features/rake_task.feature +152 -0
- data/features/report_called_undefined_steps.feature +34 -0
- data/features/rerun_formatter.feature +45 -0
- data/features/simplest.feature +11 -0
- data/features/snippet.feature +23 -0
- data/features/snippets_when_using_star_keyword.feature +36 -0
- data/features/step_definitions/cucumber_steps.rb +153 -7
- data/features/step_definitions/extra_steps.rb +2 -0
- data/features/step_definitions/simplest_steps.rb +3 -0
- data/features/step_definitions/wire_steps.rb +32 -0
- data/features/support/env.rb +140 -18
- data/features/support/env.rb.simplest +7 -0
- data/features/support/fake_wire_server.rb +77 -0
- data/features/table_diffing.feature +45 -0
- data/features/table_mapping.feature +34 -0
- data/features/tag_logic.feature +258 -0
- data/features/transform.feature +245 -0
- data/features/unicode_table.feature +35 -0
- data/features/usage_and_stepdefs_formatter.feature +169 -0
- data/features/wire_protocol.feature +332 -0
- data/features/wire_protocol_table_diffing.feature +119 -0
- data/features/wire_protocol_tags.feature +87 -0
- data/features/wire_protocol_timeouts.feature +63 -0
- data/features/work_in_progress.feature +156 -0
- data/fixtures/json/features/pystring.feature +8 -0
- data/fixtures/junit/features/pending.feature +1 -3
- data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
- data/fixtures/self_test/features/background/background_with_name.feature +7 -0
- data/fixtures/self_test/features/background/failing_background.feature +12 -0
- data/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
- data/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
- data/fixtures/self_test/features/background/passing_background.feature +10 -0
- data/fixtures/self_test/features/background/pending_background.feature +10 -0
- data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
- data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
- data/fixtures/self_test/features/support/env.rb +0 -8
- data/fixtures/tickets/features.html +1 -1
- data/gem_tasks/examples.rake +1 -1
- data/gem_tasks/features.rake +14 -0
- data/gem_tasks/sdoc.rake +12 -0
- data/lib/cucumber.rb +0 -12
- data/lib/cucumber/ast.rb +1 -1
- data/lib/cucumber/ast/background.rb +5 -21
- data/lib/cucumber/ast/examples.rb +4 -12
- data/lib/cucumber/ast/feature.rb +5 -13
- data/lib/cucumber/ast/feature_element.rb +4 -9
- data/lib/cucumber/ast/outline_table.rb +4 -4
- data/lib/cucumber/ast/py_string.rb +80 -0
- data/lib/cucumber/ast/scenario.rb +5 -7
- data/lib/cucumber/ast/scenario_outline.rb +15 -23
- data/lib/cucumber/ast/step.rb +0 -5
- data/lib/cucumber/ast/step_invocation.rb +15 -21
- data/lib/cucumber/ast/table.rb +8 -14
- data/lib/cucumber/ast/tree_walker.rb +48 -10
- data/lib/cucumber/cli/configuration.rb +8 -33
- data/lib/cucumber/cli/main.rb +35 -20
- data/lib/cucumber/cli/options.rb +7 -8
- data/lib/cucumber/cli/profile_loader.rb +0 -2
- data/lib/cucumber/core_ext/proc.rb +1 -2
- data/lib/cucumber/feature_file.rb +15 -47
- data/lib/cucumber/formatter/ansicolor.rb +5 -3
- data/lib/cucumber/formatter/color_io.rb +23 -0
- data/lib/cucumber/formatter/console.rb +23 -27
- data/lib/cucumber/formatter/cucumber.css +17 -34
- data/lib/cucumber/formatter/cucumber.sass +182 -173
- data/lib/cucumber/formatter/html.rb +11 -46
- data/lib/cucumber/formatter/io.rb +4 -2
- data/lib/cucumber/formatter/json.rb +152 -15
- data/lib/cucumber/formatter/json_pretty.rb +6 -5
- data/lib/cucumber/formatter/junit.rb +22 -28
- data/lib/cucumber/formatter/pdf.rb +6 -6
- data/lib/cucumber/formatter/pretty.rb +5 -5
- data/lib/cucumber/formatter/rerun.rb +11 -22
- data/lib/cucumber/formatter/tag_cloud.rb +35 -0
- data/lib/cucumber/formatter/unicode.rb +20 -41
- data/lib/cucumber/js_support/js_dsl.js +4 -4
- data/lib/cucumber/js_support/js_language.rb +5 -9
- data/lib/cucumber/js_support/js_snippets.rb +2 -2
- data/lib/cucumber/language_support.rb +2 -2
- data/lib/cucumber/parser/gherkin_builder.rb +30 -35
- data/lib/cucumber/platform.rb +8 -8
- data/lib/cucumber/py_support/py_language.rb +2 -2
- data/lib/cucumber/rake/task.rb +31 -74
- data/lib/cucumber/rb_support/rb_dsl.rb +0 -1
- data/lib/cucumber/rb_support/rb_language.rb +8 -10
- data/lib/cucumber/rb_support/rb_step_definition.rb +0 -8
- data/lib/cucumber/rb_support/rb_transform.rb +0 -17
- data/lib/cucumber/rb_support/rb_world.rb +18 -26
- data/lib/cucumber/rspec/doubles.rb +3 -3
- data/lib/cucumber/step_match.rb +2 -6
- data/lib/cucumber/step_mother.rb +427 -6
- data/lib/cucumber/wire_support/configuration.rb +1 -4
- data/lib/cucumber/wire_support/wire_language.rb +10 -3
- data/spec/cucumber/ast/background_spec.rb +6 -68
- data/spec/cucumber/ast/feature_factory.rb +4 -5
- data/spec/cucumber/ast/feature_spec.rb +4 -4
- data/spec/cucumber/ast/outline_table_spec.rb +1 -1
- data/spec/cucumber/ast/py_string_spec.rb +40 -0
- data/spec/cucumber/ast/scenario_outline_spec.rb +11 -15
- data/spec/cucumber/ast/scenario_spec.rb +4 -4
- data/spec/cucumber/ast/step_spec.rb +3 -3
- data/spec/cucumber/ast/table_spec.rb +2 -38
- data/spec/cucumber/ast/tree_walker_spec.rb +2 -2
- data/spec/cucumber/broadcaster_spec.rb +1 -1
- data/spec/cucumber/cli/configuration_spec.rb +6 -32
- data/spec/cucumber/cli/drb_client_spec.rb +3 -2
- data/spec/cucumber/cli/main_spec.rb +43 -43
- data/spec/cucumber/cli/options_spec.rb +1 -28
- data/spec/cucumber/cli/profile_loader_spec.rb +1 -1
- data/spec/cucumber/core_ext/proc_spec.rb +1 -1
- data/spec/cucumber/formatter/ansicolor_spec.rb +1 -1
- data/spec/cucumber/formatter/color_io_spec.rb +29 -0
- data/spec/cucumber/formatter/duration_spec.rb +1 -1
- data/spec/cucumber/formatter/html_spec.rb +5 -3
- data/spec/cucumber/formatter/junit_spec.rb +2 -16
- data/spec/cucumber/formatter/progress_spec.rb +1 -1
- data/spec/cucumber/formatter/spec_helper.rb +12 -11
- data/spec/cucumber/rb_support/rb_language_spec.rb +28 -241
- data/spec/cucumber/rb_support/rb_step_definition_spec.rb +28 -33
- data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
- data/spec/cucumber/step_match_spec.rb +9 -11
- data/spec/cucumber/step_mother_spec.rb +302 -0
- data/spec/cucumber/wire_support/configuration_spec.rb +1 -1
- data/spec/cucumber/wire_support/connection_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_exception_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_language_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_packet_spec.rb +1 -1
- data/spec/cucumber/wire_support/wire_step_definition_spec.rb +1 -1
- data/spec/cucumber/world/pending_spec.rb +2 -2
- data/spec/spec_helper.rb +20 -13
- metadata +78 -4
data/lib/cucumber/cli/options.rb
CHANGED
@@ -24,7 +24,8 @@ module Cucumber
|
|
24
24
|
"#{INDENT}the usage formatter, except that steps are not printed."],
|
25
25
|
'junit' => ['Cucumber::Formatter::Junit', 'Generates a report similar to Ant+JUnit.'],
|
26
26
|
'json' => ['Cucumber::Formatter::Json', 'Prints the feature as JSON'],
|
27
|
-
'json_pretty' => ['Cucumber::Formatter::JsonPretty', 'Prints the feature as
|
27
|
+
'json_pretty' => ['Cucumber::Formatter::JsonPretty', 'Prints the feature as pretty JSON'],
|
28
|
+
'tag_cloud' => ['Cucumber::Formatter::TagCloud', 'Prints a tag cloud of tag usage.'],
|
28
29
|
'debug' => ['Cucumber::Formatter::Debug', 'For developing formatters - prints the calls made to the listeners.']
|
29
30
|
}
|
30
31
|
max = BUILTIN_FORMATS.keys.map{|s| s.length}.max
|
@@ -164,7 +165,7 @@ module Cucumber
|
|
164
165
|
"This represents the boolean expression (@foo || !@bar) && @zap.",
|
165
166
|
"\n",
|
166
167
|
"Beware that if you want to use several negative tags to exclude several tags",
|
167
|
-
"you have to use logical AND: --tags ~@fixme --tags
|
168
|
+
"you have to use logical AND: --tags ~@fixme --tags @buggy.",
|
168
169
|
"\n",
|
169
170
|
"Positive tags can be given a threshold to limit the number of occurrences.",
|
170
171
|
"Example: --tags @qa:3 will fail if there are more than 3 occurrences of the @qa tag.",
|
@@ -198,8 +199,10 @@ module Cucumber
|
|
198
199
|
Term::ANSIColor.coloring = v
|
199
200
|
end
|
200
201
|
opts.on("-d", "--dry-run", "Invokes formatters without executing the steps.",
|
201
|
-
"This also omits the loading of your support/env.rb file if it exists."
|
202
|
+
"This also omits the loading of your support/env.rb file if it exists.",
|
203
|
+
"Implies --no-snippets.") do
|
202
204
|
@options[:dry_run] = true
|
205
|
+
@options[:snippets] = false
|
203
206
|
end
|
204
207
|
opts.on("-a", "--autoformat DIR",
|
205
208
|
"Reformats (pretty prints) feature files and write them to DIRECTORY.",
|
@@ -228,7 +231,7 @@ module Cucumber
|
|
228
231
|
opts.on("-b", "--backtrace", "Show full backtrace for all errors.") do
|
229
232
|
Cucumber.use_full_backtrace = true
|
230
233
|
end
|
231
|
-
opts.on("-S", "--strict", "Fail if there are any undefined
|
234
|
+
opts.on("-S", "--strict", "Fail if there are any undefined steps.") do
|
232
235
|
@options[:strict] = true
|
233
236
|
end
|
234
237
|
opts.on("-w", "--wip", "Fail if there are any passing scenarios.") do
|
@@ -240,9 +243,6 @@ module Cucumber
|
|
240
243
|
opts.on("-g", "--guess", "Guess best match for Ambiguous steps.") do
|
241
244
|
@options[:guess] = true
|
242
245
|
end
|
243
|
-
opts.on("-l", "--lines LINES", "Run given line numbers. Equivalent to FILE:LINE syntax") do |lines|
|
244
|
-
@options[:lines] = lines
|
245
|
-
end
|
246
246
|
opts.on("-x", "--expand", "Expand Scenario Outline Tables in output.") do
|
247
247
|
@options[:expand] = true
|
248
248
|
end
|
@@ -268,7 +268,6 @@ module Cucumber
|
|
268
268
|
@options[:snippets] = true if @options[:snippets].nil?
|
269
269
|
@options[:source] = true if @options[:source].nil?
|
270
270
|
end
|
271
|
-
@args.map! { |a| "#{a}:#{@options[:lines]}" } if @options[:lines]
|
272
271
|
|
273
272
|
extract_environment_variables
|
274
273
|
@options[:paths] = @args.dup #whatver is left over
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# Proc extension to get more location info out of a proc
|
2
2
|
class Proc #:nodoc:
|
3
3
|
PROC_PATTERN = /[\d\w]+@(.+):(\d+).*>/
|
4
|
-
PWD = Dir.pwd
|
5
4
|
|
6
5
|
def to_comment_line
|
7
6
|
"# #{file_colon_line}"
|
@@ -15,7 +14,7 @@ class Proc #:nodoc:
|
|
15
14
|
def file_colon_line
|
16
15
|
path, line = *to_s.match(PROC_PATTERN)[1..2]
|
17
16
|
path = File.expand_path(path)
|
18
|
-
pwd = File.expand_path(
|
17
|
+
pwd = File.expand_path(Dir.pwd)
|
19
18
|
if path.index(pwd)
|
20
19
|
path = path[pwd.length+1..-1]
|
21
20
|
elsif path =~ /.*\/gems\/(.*\.rb)$/
|
@@ -2,15 +2,14 @@ require 'cucumber/parser/gherkin_builder'
|
|
2
2
|
require 'gherkin/formatter/filter_formatter'
|
3
3
|
require 'gherkin/formatter/tag_count_formatter'
|
4
4
|
require 'gherkin/parser/parser'
|
5
|
+
require 'gherkin/i18n_lexer'
|
5
6
|
|
6
7
|
module Cucumber
|
7
8
|
class FeatureFile
|
8
9
|
FILE_COLON_LINE_PATTERN = /^([\w\W]*?):([\d:]+)$/ #:nodoc:
|
9
|
-
|
10
|
-
COMMENT_OR_EMPTY_LINE_PATTERN = /^\s*#|^\s*$/ #:nodoc:
|
11
|
-
ENCODING_PATTERN = /^\s*#\s*encoding\s*:\s*([^\s]+)/ #:nodoc:
|
10
|
+
LANGUAGE_PATTERN = /language:\s*(.*)/ #:nodoc:
|
12
11
|
|
13
|
-
# The +uri+ argument is the location of the source. It can
|
12
|
+
# The +uri+ argument is the location of the source. It can ba a path
|
14
13
|
# or a path:line1:line2 etc. If +source+ is passed, +uri+ is ignored.
|
15
14
|
def initialize(uri, source=nil)
|
16
15
|
@source = source
|
@@ -21,12 +20,12 @@ module Cucumber
|
|
21
20
|
@path = uri
|
22
21
|
end
|
23
22
|
end
|
24
|
-
|
23
|
+
|
25
24
|
# Parses a file and returns a Cucumber::Ast
|
26
|
-
# If +
|
25
|
+
# If +options+ contains tags, the result will
|
27
26
|
# be filtered.
|
28
|
-
def parse(
|
29
|
-
filters = @lines ||
|
27
|
+
def parse(options, tag_counts)
|
28
|
+
filters = @lines || options.filters
|
30
29
|
|
31
30
|
builder = Cucumber::Parser::GherkinBuilder.new
|
32
31
|
filter_formatter = filters.empty? ? builder : Gherkin::Formatter::FilterFormatter.new(builder, filters)
|
@@ -40,7 +39,7 @@ module Cucumber
|
|
40
39
|
ast.language = parser.i18n_language
|
41
40
|
ast.file = @path
|
42
41
|
ast
|
43
|
-
rescue Gherkin::
|
42
|
+
rescue Gherkin::LexingError, Gherkin::Parser::ParseError => e
|
44
43
|
e.message.insert(0, "#{@path}: ")
|
45
44
|
raise e
|
46
45
|
end
|
@@ -52,50 +51,19 @@ module Cucumber
|
|
52
51
|
open(@path).read
|
53
52
|
else
|
54
53
|
begin
|
55
|
-
|
56
|
-
encoding = encoding_for(source)
|
57
|
-
if(DEFAULT_ENCODING.downcase != encoding.downcase)
|
58
|
-
# Read the file again - it's explicitly declaring a different encoding
|
59
|
-
source = File.open(@path, Cucumber.file_mode('r', encoding)).read
|
60
|
-
source = to_default_encoding(source, encoding)
|
61
|
-
end
|
62
|
-
source
|
54
|
+
File.open(@path, Cucumber.file_mode('r')).read
|
63
55
|
rescue Errno::EACCES => e
|
64
|
-
|
65
|
-
|
66
|
-
rescue Errno::ENOENT => e
|
67
|
-
# special-case opening features, because this could be a new user:
|
68
|
-
if(@path == 'features')
|
69
|
-
STDERR.puts("You don't have a 'features' directory. Please create one to get started.",
|
70
|
-
"See http://cukes.info/ for more information.")
|
71
|
-
exit 1
|
72
|
-
end
|
56
|
+
p = File.expand_path(@path)
|
57
|
+
e.message << "\nCouldn't open #{p}"
|
73
58
|
raise e
|
74
59
|
end
|
75
60
|
end
|
76
61
|
end
|
77
|
-
|
62
|
+
|
78
63
|
private
|
79
64
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
break unless COMMENT_OR_EMPTY_LINE_PATTERN =~ line
|
84
|
-
if ENCODING_PATTERN =~ line
|
85
|
-
encoding = $1
|
86
|
-
break
|
87
|
-
end
|
88
|
-
end
|
89
|
-
encoding
|
90
|
-
end
|
91
|
-
|
92
|
-
def to_default_encoding(string, encoding)
|
93
|
-
if string.respond_to?(:encode)
|
94
|
-
string.encode(DEFAULT_ENCODING)
|
95
|
-
else
|
96
|
-
require 'iconv'
|
97
|
-
Iconv.new(DEFAULT_ENCODING, encoding).iconv(string)
|
98
|
-
end
|
99
|
-
end
|
65
|
+
# Special PML markup that we want to filter out.
|
66
|
+
CO = %{\\s*<(label|callout)\s+id=".*?"\s*/>\\s*}
|
67
|
+
C_CALLOUT = %r{/\*#{CO}\*/|//#{CO}}o
|
100
68
|
end
|
101
69
|
end
|
@@ -15,13 +15,15 @@ if Cucumber::IRONRUBY
|
|
15
15
|
end
|
16
16
|
|
17
17
|
if Cucumber::WINDOWS_MRI
|
18
|
-
|
19
|
-
|
18
|
+
begin
|
19
|
+
require 'Win32/Console/ANSI'
|
20
|
+
rescue LoadError
|
21
|
+
STDERR.puts %{*** WARNING: You must "gem install win32console" (1.2.0 or higher) to get coloured output on MRI/Windows}
|
20
22
|
Term::ANSIColor.coloring = false
|
21
23
|
end
|
22
24
|
end
|
23
25
|
|
24
|
-
Term::ANSIColor.coloring = false if !STDOUT.tty? && !ENV.has_key?(
|
26
|
+
Term::ANSIColor.coloring = false if !STDOUT.tty? && !ENV.has_key?("AUTOTEST")
|
25
27
|
|
26
28
|
module Cucumber
|
27
29
|
module Formatter
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'forwardable'
|
2
|
+
|
3
|
+
module Cucumber
|
4
|
+
module Formatter
|
5
|
+
# Adapter to make #puts/#print/#flush work with win32console
|
6
|
+
class ColorIO #:nodoc:
|
7
|
+
extend Forwardable
|
8
|
+
def_delegators :@kernel, :puts, :print # win32console colours only work when sent to Kernel
|
9
|
+
def_delegators :@stdout, :flush, :tty?, :write, :close
|
10
|
+
|
11
|
+
def initialize(kernel, stdout)
|
12
|
+
@kernel = kernel
|
13
|
+
@stdout = stdout
|
14
|
+
end
|
15
|
+
|
16
|
+
# Ensure using << still gets colours in win32console
|
17
|
+
def <<(output)
|
18
|
+
print(output)
|
19
|
+
self
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -26,15 +26,13 @@ module Cucumber
|
|
26
26
|
format_string(line, status)
|
27
27
|
end
|
28
28
|
|
29
|
-
def format_string(
|
29
|
+
def format_string(string, status)
|
30
30
|
fmt = format_for(status)
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
end
|
37
|
-
end.join("\n")
|
31
|
+
if Proc === fmt
|
32
|
+
fmt.call(string)
|
33
|
+
else
|
34
|
+
fmt % string
|
35
|
+
end
|
38
36
|
end
|
39
37
|
|
40
38
|
def print_steps(status)
|
@@ -127,45 +125,43 @@ module Cucumber
|
|
127
125
|
end
|
128
126
|
end
|
129
127
|
|
130
|
-
def embed(file, mime_type
|
128
|
+
def embed(file, mime_type)
|
131
129
|
# no-op
|
132
130
|
end
|
133
131
|
|
134
|
-
#define @
|
132
|
+
#define @delayed_announcements = [] in your Formatter if you want to
|
135
133
|
#activate this feature
|
136
|
-
def
|
137
|
-
if @
|
138
|
-
@
|
134
|
+
def announce(announcement)
|
135
|
+
if @delayed_announcements
|
136
|
+
@delayed_announcements << announcement
|
139
137
|
else
|
140
138
|
if @io
|
141
139
|
@io.puts
|
142
|
-
|
143
|
-
@io.puts(format_string(message, :tag))
|
144
|
-
end
|
140
|
+
@io.puts(format_string(announcement, :tag))
|
145
141
|
@io.flush
|
146
142
|
end
|
147
143
|
end
|
148
144
|
end
|
149
145
|
|
150
|
-
def
|
151
|
-
@
|
152
|
-
|
146
|
+
def print_announcements()
|
147
|
+
@delayed_announcements.each {|ann| print_announcement(ann)}
|
148
|
+
empty_announcements
|
153
149
|
end
|
154
150
|
|
155
|
-
def
|
156
|
-
return if @
|
157
|
-
@io.print(format_string(@
|
151
|
+
def print_table_row_announcements
|
152
|
+
return if @delayed_announcements.empty?
|
153
|
+
@io.print(format_string(@delayed_announcements.join(', '), :tag).indent(2))
|
158
154
|
@io.flush
|
159
|
-
|
155
|
+
empty_announcements
|
160
156
|
end
|
161
157
|
|
162
|
-
def
|
163
|
-
@io.puts(format_string(
|
158
|
+
def print_announcement(announcement)
|
159
|
+
@io.puts(format_string(announcement, :tag).indent(@indent))
|
164
160
|
@io.flush
|
165
161
|
end
|
166
162
|
|
167
|
-
def
|
168
|
-
@
|
163
|
+
def empty_announcements
|
164
|
+
@delayed_announcements = []
|
169
165
|
end
|
170
166
|
|
171
167
|
private
|
@@ -2,7 +2,7 @@
|
|
2
2
|
/* Regenerate with rake sass */
|
3
3
|
body {
|
4
4
|
font-size: 0px;
|
5
|
-
color:
|
5
|
+
color: #FFFFFF;
|
6
6
|
margin: 0px;
|
7
7
|
padding: 0px;
|
8
8
|
}
|
@@ -10,11 +10,11 @@ body {
|
|
10
10
|
.cucumber, td, th {
|
11
11
|
font: normal 11px "Lucida Grande", Helvetica, sans-serif;
|
12
12
|
background: white;
|
13
|
-
color:
|
13
|
+
color: #000000;
|
14
14
|
}
|
15
15
|
.cucumber #cucumber-header, td #cucumber-header, th #cucumber-header {
|
16
|
-
background: #
|
17
|
-
color:
|
16
|
+
background: #65C400;
|
17
|
+
color: #FFFFFF;
|
18
18
|
height: 6em;
|
19
19
|
}
|
20
20
|
.cucumber #cucumber-header #expand-collapse p, td #cucumber-header #expand-collapse p, th #cucumber-header #expand-collapse p {
|
@@ -25,8 +25,8 @@ body {
|
|
25
25
|
font-size: 11px;
|
26
26
|
padding: 3px;
|
27
27
|
margin: 0;
|
28
|
-
background: #
|
29
|
-
color:
|
28
|
+
background: #65C400;
|
29
|
+
color: #FFFFFF;
|
30
30
|
font-weight: bold;
|
31
31
|
}
|
32
32
|
.cucumber h1, td h1, th h1 {
|
@@ -62,23 +62,19 @@ body {
|
|
62
62
|
.cucumber .step_file a, td .step_file a, th .step_file a {
|
63
63
|
color: #999999;
|
64
64
|
}
|
65
|
-
.cucumber .scenario_file, td .scenario_file, th .scenario_file {
|
66
|
-
float: right;
|
67
|
-
color: #999999;
|
68
|
-
}
|
69
65
|
.cucumber .tag, td .tag, th .tag {
|
70
66
|
font-weight: bold;
|
71
|
-
color: #
|
67
|
+
color: #246AC1;
|
72
68
|
}
|
73
69
|
.cucumber .backtrace, td .backtrace, th .backtrace {
|
74
70
|
margin-top: 0;
|
75
71
|
margin-bottom: 0;
|
76
72
|
margin-left: 1em;
|
77
|
-
color:
|
73
|
+
color: #000000;
|
78
74
|
}
|
79
75
|
.cucumber a, td a, th a {
|
80
76
|
text-decoration: none;
|
81
|
-
color: #
|
77
|
+
color: #BE5C00;
|
82
78
|
}
|
83
79
|
.cucumber a:hover, td a:hover, th a:hover {
|
84
80
|
text-decoration: underline;
|
@@ -88,7 +84,7 @@ body {
|
|
88
84
|
}
|
89
85
|
.cucumber a div.examples, td a div.examples, th a div.examples {
|
90
86
|
margin: 5px 0px 5px 15px;
|
91
|
-
color:
|
87
|
+
color: #000000;
|
92
88
|
}
|
93
89
|
.cucumber .outline table, td .outline table, th .outline table {
|
94
90
|
margin: 0px 0px 5px 10px;
|
@@ -133,12 +129,6 @@ body {
|
|
133
129
|
background: #fcfb98;
|
134
130
|
color: #131313;
|
135
131
|
}
|
136
|
-
.cucumber table td.message, td table td.message, th table td.message {
|
137
|
-
border-left: 5px solid aqua;
|
138
|
-
border-bottom: 1px solid aqua;
|
139
|
-
background: #e0ffff;
|
140
|
-
color: #001111;
|
141
|
-
}
|
142
132
|
.cucumber ol, td ol, th ol {
|
143
133
|
list-style: none;
|
144
134
|
margin: 0px;
|
@@ -185,13 +175,6 @@ body {
|
|
185
175
|
background: #fcfb98;
|
186
176
|
color: #131313;
|
187
177
|
}
|
188
|
-
.cucumber ol li.message, td ol li.message, th ol li.message {
|
189
|
-
border-left: 5px solid aqua;
|
190
|
-
border-bottom: 1px solid aqua;
|
191
|
-
background: #e0ffff;
|
192
|
-
color: #001111;
|
193
|
-
margin-left: 10px;
|
194
|
-
}
|
195
178
|
.cucumber #summary, td #summary, th #summary {
|
196
179
|
margin: 0px;
|
197
180
|
padding: 5px 10px;
|
@@ -215,7 +198,7 @@ body {
|
|
215
198
|
padding: 0.1em 0 0.2em 0;
|
216
199
|
}
|
217
200
|
.ruby .keyword {
|
218
|
-
color: #
|
201
|
+
color: #FF6600;
|
219
202
|
}
|
220
203
|
.ruby .constant {
|
221
204
|
color: #339999;
|
@@ -233,13 +216,13 @@ body {
|
|
233
216
|
color: white;
|
234
217
|
}
|
235
218
|
.ruby .string {
|
236
|
-
color: #
|
219
|
+
color: #66FF00;
|
237
220
|
}
|
238
221
|
.ruby .ident {
|
239
222
|
color: white;
|
240
223
|
}
|
241
224
|
.ruby .method {
|
242
|
-
color: #
|
225
|
+
color: #FFCC00;
|
243
226
|
}
|
244
227
|
.ruby .number {
|
245
228
|
color: white;
|
@@ -248,13 +231,13 @@ body {
|
|
248
231
|
color: white;
|
249
232
|
}
|
250
233
|
.ruby .comment {
|
251
|
-
color: #
|
234
|
+
color: #9933CC;
|
252
235
|
}
|
253
236
|
.ruby .symbol {
|
254
237
|
color: white;
|
255
238
|
}
|
256
239
|
.ruby .regex {
|
257
|
-
color: #
|
240
|
+
color: #44B4CC;
|
258
241
|
}
|
259
242
|
.ruby .punct {
|
260
243
|
color: white;
|
@@ -274,6 +257,6 @@ body {
|
|
274
257
|
.ruby .linenum {
|
275
258
|
width: 75px;
|
276
259
|
padding: 0.1em 1em 0.2em 0;
|
277
|
-
color:
|
278
|
-
background: #
|
260
|
+
color: #000000;
|
261
|
+
background: #FFFBD3;
|
279
262
|
}
|