cucumber 0.8.6 → 0.8.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (180) hide show
  1. data/.rspec +1 -1
  2. data/Caliper.yml +4 -0
  3. data/History.txt +1557 -0
  4. data/LICENSE +1 -1
  5. data/README.rdoc +26 -0
  6. data/Rakefile +51 -5
  7. data/VERSION.yml +5 -0
  8. data/bin/cucumber +1 -7
  9. data/cucumber.gemspec +77 -3
  10. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +1 -1
  11. data/examples/i18n/he/features/step_definitons/calculator_steps.rb +1 -1
  12. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +7 -4
  13. data/examples/i18n/ro/features/suma.feature +11 -0
  14. data/examples/i18n/ru/features/division.feature +2 -2
  15. data/examples/i18n/tr/features/step_definitons/hesap_makinesi_adimlari.rb +3 -3
  16. data/examples/sinatra/features/support/env.rb +5 -2
  17. data/examples/v8/features/fibonacci.feature +1 -1
  18. data/examples/watir/features/step_definitions/search_steps.rb +1 -1
  19. data/features/announce.feature +164 -0
  20. data/features/around_hooks.feature +232 -0
  21. data/features/background.feature +95 -284
  22. data/features/bug_371.feature +32 -0
  23. data/features/bug_464.feature +16 -0
  24. data/features/bug_475.feature +42 -0
  25. data/features/bug_585_tab_indentation.feature +22 -0
  26. data/features/bug_600.feature +67 -0
  27. data/features/call_steps_from_stepdefs.feature +154 -0
  28. data/features/cucumber_cli.feature +591 -0
  29. data/features/cucumber_cli_outlines.feature +117 -0
  30. data/features/custom_formatter.feature +73 -3
  31. data/features/default_snippets.feature +42 -0
  32. data/features/diffing.feature +25 -0
  33. data/features/drb_server_integration.feature +174 -0
  34. data/features/exception_in_after_block.feature +127 -0
  35. data/features/exception_in_after_step_block.feature +104 -0
  36. data/features/exception_in_before_block.feature +98 -0
  37. data/features/exclude_files.feature +20 -0
  38. data/features/expand.feature +60 -0
  39. data/features/html_formatter.feature +8 -0
  40. data/features/html_formatter/a.html +582 -0
  41. data/features/json_formatter.feature +245 -160
  42. data/features/junit_formatter.feature +88 -0
  43. data/features/language_from_header.feature +30 -0
  44. data/features/language_help.feature +78 -0
  45. data/features/listener_debugger_formatter.feature +42 -0
  46. data/features/multiline_names.feature +44 -0
  47. data/features/negative_tagged_hooks.feature +60 -0
  48. data/features/post_configuration_hook.feature +37 -0
  49. data/features/profiles.feature +126 -0
  50. data/features/rake_task.feature +152 -0
  51. data/features/report_called_undefined_steps.feature +34 -0
  52. data/features/rerun_formatter.feature +45 -0
  53. data/features/simplest.feature +11 -0
  54. data/features/snippet.feature +23 -0
  55. data/features/snippets_when_using_star_keyword.feature +36 -0
  56. data/features/step_definitions/cucumber_steps.rb +153 -7
  57. data/features/step_definitions/extra_steps.rb +2 -0
  58. data/features/step_definitions/simplest_steps.rb +3 -0
  59. data/features/step_definitions/wire_steps.rb +32 -0
  60. data/features/support/env.rb +140 -18
  61. data/features/support/env.rb.simplest +7 -0
  62. data/features/support/fake_wire_server.rb +77 -0
  63. data/features/table_diffing.feature +45 -0
  64. data/features/table_mapping.feature +34 -0
  65. data/features/tag_logic.feature +258 -0
  66. data/features/transform.feature +245 -0
  67. data/features/unicode_table.feature +35 -0
  68. data/features/usage_and_stepdefs_formatter.feature +169 -0
  69. data/features/wire_protocol.feature +332 -0
  70. data/features/wire_protocol_table_diffing.feature +119 -0
  71. data/features/wire_protocol_tags.feature +87 -0
  72. data/features/wire_protocol_timeouts.feature +63 -0
  73. data/features/work_in_progress.feature +156 -0
  74. data/fixtures/json/features/pystring.feature +8 -0
  75. data/fixtures/junit/features/pending.feature +1 -3
  76. data/fixtures/self_test/features/background/background_tagged_before_on_outline.feature +12 -0
  77. data/fixtures/self_test/features/background/background_with_name.feature +7 -0
  78. data/fixtures/self_test/features/background/failing_background.feature +12 -0
  79. data/fixtures/self_test/features/background/failing_background_after_success.feature +11 -0
  80. data/fixtures/self_test/features/background/multiline_args_background.feature +32 -0
  81. data/fixtures/self_test/features/background/passing_background.feature +10 -0
  82. data/fixtures/self_test/features/background/pending_background.feature +10 -0
  83. data/fixtures/self_test/features/background/scenario_outline_failing_background.feature +16 -0
  84. data/fixtures/self_test/features/background/scenario_outline_passing_background.feature +16 -0
  85. data/fixtures/self_test/features/support/env.rb +0 -8
  86. data/fixtures/tickets/features.html +1 -1
  87. data/gem_tasks/examples.rake +1 -1
  88. data/gem_tasks/features.rake +14 -0
  89. data/gem_tasks/sdoc.rake +12 -0
  90. data/lib/cucumber.rb +0 -12
  91. data/lib/cucumber/ast.rb +1 -1
  92. data/lib/cucumber/ast/background.rb +5 -21
  93. data/lib/cucumber/ast/examples.rb +4 -12
  94. data/lib/cucumber/ast/feature.rb +5 -13
  95. data/lib/cucumber/ast/feature_element.rb +4 -9
  96. data/lib/cucumber/ast/outline_table.rb +4 -4
  97. data/lib/cucumber/ast/py_string.rb +80 -0
  98. data/lib/cucumber/ast/scenario.rb +5 -7
  99. data/lib/cucumber/ast/scenario_outline.rb +15 -23
  100. data/lib/cucumber/ast/step.rb +0 -5
  101. data/lib/cucumber/ast/step_invocation.rb +15 -21
  102. data/lib/cucumber/ast/table.rb +8 -14
  103. data/lib/cucumber/ast/tree_walker.rb +48 -10
  104. data/lib/cucumber/cli/configuration.rb +8 -33
  105. data/lib/cucumber/cli/main.rb +35 -20
  106. data/lib/cucumber/cli/options.rb +7 -8
  107. data/lib/cucumber/cli/profile_loader.rb +0 -2
  108. data/lib/cucumber/core_ext/proc.rb +1 -2
  109. data/lib/cucumber/feature_file.rb +15 -47
  110. data/lib/cucumber/formatter/ansicolor.rb +5 -3
  111. data/lib/cucumber/formatter/color_io.rb +23 -0
  112. data/lib/cucumber/formatter/console.rb +23 -27
  113. data/lib/cucumber/formatter/cucumber.css +17 -34
  114. data/lib/cucumber/formatter/cucumber.sass +182 -173
  115. data/lib/cucumber/formatter/html.rb +11 -46
  116. data/lib/cucumber/formatter/io.rb +4 -2
  117. data/lib/cucumber/formatter/json.rb +152 -15
  118. data/lib/cucumber/formatter/json_pretty.rb +6 -5
  119. data/lib/cucumber/formatter/junit.rb +22 -28
  120. data/lib/cucumber/formatter/pdf.rb +6 -6
  121. data/lib/cucumber/formatter/pretty.rb +5 -5
  122. data/lib/cucumber/formatter/rerun.rb +11 -22
  123. data/lib/cucumber/formatter/tag_cloud.rb +35 -0
  124. data/lib/cucumber/formatter/unicode.rb +20 -41
  125. data/lib/cucumber/js_support/js_dsl.js +4 -4
  126. data/lib/cucumber/js_support/js_language.rb +5 -9
  127. data/lib/cucumber/js_support/js_snippets.rb +2 -2
  128. data/lib/cucumber/language_support.rb +2 -2
  129. data/lib/cucumber/parser/gherkin_builder.rb +30 -35
  130. data/lib/cucumber/platform.rb +8 -8
  131. data/lib/cucumber/py_support/py_language.rb +2 -2
  132. data/lib/cucumber/rake/task.rb +31 -74
  133. data/lib/cucumber/rb_support/rb_dsl.rb +0 -1
  134. data/lib/cucumber/rb_support/rb_language.rb +8 -10
  135. data/lib/cucumber/rb_support/rb_step_definition.rb +0 -8
  136. data/lib/cucumber/rb_support/rb_transform.rb +0 -17
  137. data/lib/cucumber/rb_support/rb_world.rb +18 -26
  138. data/lib/cucumber/rspec/doubles.rb +3 -3
  139. data/lib/cucumber/step_match.rb +2 -6
  140. data/lib/cucumber/step_mother.rb +427 -6
  141. data/lib/cucumber/wire_support/configuration.rb +1 -4
  142. data/lib/cucumber/wire_support/wire_language.rb +10 -3
  143. data/spec/cucumber/ast/background_spec.rb +6 -68
  144. data/spec/cucumber/ast/feature_factory.rb +4 -5
  145. data/spec/cucumber/ast/feature_spec.rb +4 -4
  146. data/spec/cucumber/ast/outline_table_spec.rb +1 -1
  147. data/spec/cucumber/ast/py_string_spec.rb +40 -0
  148. data/spec/cucumber/ast/scenario_outline_spec.rb +11 -15
  149. data/spec/cucumber/ast/scenario_spec.rb +4 -4
  150. data/spec/cucumber/ast/step_spec.rb +3 -3
  151. data/spec/cucumber/ast/table_spec.rb +2 -38
  152. data/spec/cucumber/ast/tree_walker_spec.rb +2 -2
  153. data/spec/cucumber/broadcaster_spec.rb +1 -1
  154. data/spec/cucumber/cli/configuration_spec.rb +6 -32
  155. data/spec/cucumber/cli/drb_client_spec.rb +3 -2
  156. data/spec/cucumber/cli/main_spec.rb +43 -43
  157. data/spec/cucumber/cli/options_spec.rb +1 -28
  158. data/spec/cucumber/cli/profile_loader_spec.rb +1 -1
  159. data/spec/cucumber/core_ext/proc_spec.rb +1 -1
  160. data/spec/cucumber/formatter/ansicolor_spec.rb +1 -1
  161. data/spec/cucumber/formatter/color_io_spec.rb +29 -0
  162. data/spec/cucumber/formatter/duration_spec.rb +1 -1
  163. data/spec/cucumber/formatter/html_spec.rb +5 -3
  164. data/spec/cucumber/formatter/junit_spec.rb +2 -16
  165. data/spec/cucumber/formatter/progress_spec.rb +1 -1
  166. data/spec/cucumber/formatter/spec_helper.rb +12 -11
  167. data/spec/cucumber/rb_support/rb_language_spec.rb +28 -241
  168. data/spec/cucumber/rb_support/rb_step_definition_spec.rb +28 -33
  169. data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +1 -1
  170. data/spec/cucumber/step_match_spec.rb +9 -11
  171. data/spec/cucumber/step_mother_spec.rb +302 -0
  172. data/spec/cucumber/wire_support/configuration_spec.rb +1 -1
  173. data/spec/cucumber/wire_support/connection_spec.rb +1 -1
  174. data/spec/cucumber/wire_support/wire_exception_spec.rb +1 -1
  175. data/spec/cucumber/wire_support/wire_language_spec.rb +1 -1
  176. data/spec/cucumber/wire_support/wire_packet_spec.rb +1 -1
  177. data/spec/cucumber/wire_support/wire_step_definition_spec.rb +1 -1
  178. data/spec/cucumber/world/pending_spec.rb +2 -2
  179. data/spec/spec_helper.rb +20 -13
  180. metadata +78 -4
@@ -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 prettified JSON'],
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 ~@buggy.",
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.") do
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 or pending steps.") do
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,5 +1,3 @@
1
- require 'yaml'
2
-
3
1
  module Cucumber
4
2
  module Cli
5
3
 
@@ -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(PWD)
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
- DEFAULT_ENCODING = "UTF-8" #:nodoc:
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 be a path
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 +configuration_filters+ contains any filters, the result will
25
+ # If +options+ contains tags, the result will
27
26
  # be filtered.
28
- def parse(configuration_filters, tag_counts)
29
- filters = @lines || configuration_filters
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::Lexer::LexingError, Gherkin::Parser::ParseError => e
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
- source = File.open(@path, Cucumber.file_mode('r', DEFAULT_ENCODING)).read
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
- e.message << "\nCouldn't open #{File.expand_path(@path)}"
65
- raise e
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
- def encoding_for(source)
81
- encoding = DEFAULT_ENCODING
82
- source.each_line do |line|
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
- unless ENV['ANSICON']
19
- STDERR.puts %{*** WARNING: You must use ANSICON 1.31 or higher (http://adoxa.110mb.com/ansicon) to get coloured output on Windows}
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?('AUTOTEST')
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(o, status)
29
+ def format_string(string, status)
30
30
  fmt = format_for(status)
31
- o.to_s.split("\n").map do |line|
32
- if Proc === fmt
33
- fmt.call(line)
34
- else
35
- fmt % line
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, label)
128
+ def embed(file, mime_type)
131
129
  # no-op
132
130
  end
133
131
 
134
- #define @delayed_messages = [] in your Formatter if you want to
132
+ #define @delayed_announcements = [] in your Formatter if you want to
135
133
  #activate this feature
136
- def puts(*messages)
137
- if @delayed_messages
138
- @delayed_messages += messages
134
+ def announce(announcement)
135
+ if @delayed_announcements
136
+ @delayed_announcements << announcement
139
137
  else
140
138
  if @io
141
139
  @io.puts
142
- messages.each do |message|
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 print_messages
151
- @delayed_messages.each {|message| print_message(message)}
152
- empty_messages
146
+ def print_announcements()
147
+ @delayed_announcements.each {|ann| print_announcement(ann)}
148
+ empty_announcements
153
149
  end
154
150
 
155
- def print_table_row_messages
156
- return if @delayed_messages.empty?
157
- @io.print(format_string(@delayed_messages.join(', '), :tag).indent(2))
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
- empty_messages
155
+ empty_announcements
160
156
  end
161
157
 
162
- def print_message(message)
163
- @io.puts(format_string(message, :tag).indent(@indent))
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 empty_messages
168
- @delayed_messages = []
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: white;
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: black;
13
+ color: #000000;
14
14
  }
15
15
  .cucumber #cucumber-header, td #cucumber-header, th #cucumber-header {
16
- background: #65c400;
17
- color: white;
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: #65c400;
29
- color: white;
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: #246ac1;
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: black;
73
+ color: #000000;
78
74
  }
79
75
  .cucumber a, td a, th a {
80
76
  text-decoration: none;
81
- color: #be5c00;
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: black;
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: #ff6600;
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: #66ff00;
219
+ color: #66FF00;
237
220
  }
238
221
  .ruby .ident {
239
222
  color: white;
240
223
  }
241
224
  .ruby .method {
242
- color: #ffcc00;
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: #9933cc;
234
+ color: #9933CC;
252
235
  }
253
236
  .ruby .symbol {
254
237
  color: white;
255
238
  }
256
239
  .ruby .regex {
257
- color: #44b4cc;
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: black;
278
- background: #fffbd3;
260
+ color: #000000;
261
+ background: #FFFBD3;
279
262
  }