aslakhellesoy-cucumber 0.1.13.3 → 0.1.14.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/History.txt +11 -1
  2. data/Manifest.txt +6 -1
  3. data/config/hoe.rb +1 -0
  4. data/examples/calculator_ruby_features/features/step_definitons/calculator_steps.rb +1 -1
  5. data/examples/cs/features/step_definitons/calculator_steps.rb +1 -1
  6. data/examples/i18n/Rakefile +18 -2
  7. data/examples/i18n/ar/features/step_definitons/calculator_steps.rb +2 -1
  8. data/examples/i18n/da/features/step_definitons/kalkulator_steps.rb +2 -1
  9. data/examples/i18n/de/features/step_definitons/calculator_steps.rb +2 -1
  10. data/examples/i18n/en/features/step_definitons/calculator_steps.rb +2 -1
  11. data/examples/i18n/es/features/step_definitons/calculador_steps.rb +2 -1
  12. data/examples/i18n/et/features/step_definitions/kalkulaator_steps.rb +2 -1
  13. data/examples/i18n/fr/features/step_definitions/calculatrice_steps.rb +2 -1
  14. data/examples/i18n/id/features/step_definitons/calculator_steps.rb +2 -1
  15. data/examples/i18n/it/features/step_definitons/calcolatrice_steps.rb +2 -1
  16. data/examples/i18n/ja/features/step_definitons/calculator_steps.rb +2 -1
  17. data/examples/i18n/lt/features/step_definitons/calculator_steps.rb +2 -1
  18. data/examples/i18n/no/features/step_definitons/kalkulator_steps.rb +2 -1
  19. data/examples/i18n/pt/features/step_definitions/calculadora_steps.rb +2 -1
  20. data/examples/i18n/ro/features/step_definitons/calculator_steps.rb +2 -1
  21. data/examples/i18n/se/features/step_definitons/kalkulator_steps.rb +2 -1
  22. data/examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb +2 -1
  23. data/examples/java/features/step_definitons/hello_steps.rb +1 -1
  24. data/examples/java/features/step_definitons/tree_steps.rb +1 -1
  25. data/examples/selenium/features/step_definitons/stories_steps.rb +1 -1
  26. data/examples/tickets/features/step_definitons/tickets_steps.rb +1 -1
  27. data/examples/watir/README.textile +16 -0
  28. data/examples/watir/features/support/env.rb +1 -1
  29. data/gem_tasks/rspec.rake +2 -2
  30. data/gem_tasks/treetop.rake +1 -1
  31. data/lib/autotest/cucumber_mixin.rb +1 -1
  32. data/lib/cucumber/cli.rb +2 -1
  33. data/lib/cucumber/core_ext/string.rb +1 -1
  34. data/lib/cucumber/formatters/ansicolor.rb +1 -1
  35. data/lib/cucumber/formatters/pretty_formatter.rb +11 -6
  36. data/lib/cucumber/formatters/unicode.rb +1 -1
  37. data/lib/cucumber/languages.yml +11 -0
  38. data/lib/cucumber/platform.rb +2 -1
  39. data/lib/cucumber/rails/rspec.rb +1 -1
  40. data/lib/cucumber/treetop_parser/feature.treetop.erb +1 -0
  41. data/lib/cucumber/treetop_parser/feature_ar.rb +1 -0
  42. data/lib/cucumber/treetop_parser/feature_cy.rb +1 -0
  43. data/lib/cucumber/treetop_parser/feature_da.rb +1 -0
  44. data/lib/cucumber/treetop_parser/feature_de.rb +1 -0
  45. data/lib/cucumber/treetop_parser/feature_en-lol.rb +1 -0
  46. data/lib/cucumber/treetop_parser/feature_en-tx.rb +1 -0
  47. data/lib/cucumber/treetop_parser/feature_en.rb +1 -0
  48. data/lib/cucumber/treetop_parser/feature_es.rb +1 -0
  49. data/lib/cucumber/treetop_parser/feature_et.rb +1 -0
  50. data/lib/cucumber/treetop_parser/feature_fr.rb +1 -0
  51. data/lib/cucumber/treetop_parser/feature_id.rb +1 -0
  52. data/lib/cucumber/treetop_parser/feature_it.rb +1 -0
  53. data/lib/cucumber/treetop_parser/feature_ja.rb +1 -0
  54. data/lib/cucumber/treetop_parser/feature_lt.rb +1 -0
  55. data/lib/cucumber/treetop_parser/feature_nl.rb +1 -0
  56. data/lib/cucumber/treetop_parser/feature_no.rb +1 -0
  57. data/lib/cucumber/treetop_parser/feature_parser.rb +3 -1
  58. data/lib/cucumber/treetop_parser/feature_pl.rb +1 -0
  59. data/lib/cucumber/treetop_parser/feature_pt.rb +1 -0
  60. data/lib/cucumber/treetop_parser/feature_ro.rb +1 -0
  61. data/lib/cucumber/treetop_parser/feature_ro2.rb +1 -0
  62. data/lib/cucumber/treetop_parser/feature_ru.rb +1 -0
  63. data/lib/cucumber/treetop_parser/feature_se.rb +1 -0
  64. data/lib/cucumber/treetop_parser/feature_zh-CN.rb +1 -0
  65. data/lib/cucumber/version.rb +2 -2
  66. data/spec/cucumber/formatters/pretty_formatter_spec.rb +34 -3
  67. data/spec/spec_helper.rb +1 -1
  68. metadata +3 -3
  69. data/examples/java/src/cucumber/demo/Hello.java +0 -16
@@ -1,14 +1,24 @@
1
1
  == In Git
2
2
 
3
+ === New features
4
+ * 한국어! (Korean!) (John Hwang)
5
+
6
+ == 0.1.14 2009-01-04
7
+
8
+ This is the first release of Cucumber that runs on Ruby 1.9. There are still some encoding-related issues
9
+ with Arabic (ar), Japanese (ja) and Simplified Chinese (zh-CN). Patches are welcome. Other than that -
10
+ a couple of minor bug fixes and polishing.
11
+
3
12
  === New features
4
13
  * Pretty formatter shows number of scenarios (#139 Joseph Wilk)
14
+ * Rudimentary support for Ruby 1.9. Now it's ok to file Ruby 1.9-related bugs.
5
15
 
6
16
  === Bugfixes
7
17
  * Fixed "No such file or directory -- cucumber (LoadError)" bug with AutoTest (Aslak Hellesøy)
8
18
  * Fixed `load_missing_constant': uninitialized constant Dispatcher error with Rails (Aslak Hellesøy)
9
19
 
10
20
  === Removed features
11
-
21
+ * The #binary= method is gone from the Rake task. It will always point to the binary in the current gem. (Aslak Hellesøy)
12
22
 
13
23
  == 0.1.13 2008-12-20
14
24
 
@@ -65,6 +65,11 @@ examples/i18n/ja/features/addition.feature
65
65
  examples/i18n/ja/features/division.feature
66
66
  examples/i18n/ja/features/step_definitons/calculator_steps.rb
67
67
  examples/i18n/ja/lib/calculator.rb
68
+ examples/i18n/ko/Rakefile
69
+ examples/i18n/ko/features/addition.feature
70
+ examples/i18n/ko/features/division.feature
71
+ examples/i18n/ko/features/step_definitons/calculator_steps.rb
72
+ examples/i18n/ko/lib/calculator.rb
68
73
  examples/i18n/lt/Rakefile
69
74
  examples/i18n/lt/features/addition.feature
70
75
  examples/i18n/lt/features/division.feature
@@ -96,7 +101,6 @@ examples/java/features/hello.feature
96
101
  examples/java/features/step_definitons/hello_steps.rb
97
102
  examples/java/features/step_definitons/tree_steps.rb
98
103
  examples/java/features/tree.feature
99
- examples/java/src/cucumber/demo/Hello.java
100
104
  examples/selenium/Rakefile
101
105
  examples/selenium/features/search.feature
102
106
  examples/selenium/features/step_definitons/stories_steps.rb
@@ -182,6 +186,7 @@ lib/cucumber/treetop_parser/feature_fr.rb
182
186
  lib/cucumber/treetop_parser/feature_id.rb
183
187
  lib/cucumber/treetop_parser/feature_it.rb
184
188
  lib/cucumber/treetop_parser/feature_ja.rb
189
+ lib/cucumber/treetop_parser/feature_ko.rb
185
190
  lib/cucumber/treetop_parser/feature_lt.rb
186
191
  lib/cucumber/treetop_parser/feature_nl.rb
187
192
  lib/cucumber/treetop_parser/feature_no.rb
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  require 'cucumber/version'
2
3
 
3
4
  AUTHOR = 'Aslak Hellesøy' # can also be an array of Authors
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
 
3
3
  class Calculator
4
4
  def push(n)
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
3
  require 'Calculator'
4
4
 
@@ -4,13 +4,29 @@ task :i18n do
4
4
  Dir["#{dir}/*"].each do |f|
5
5
  if File.directory?(f)
6
6
  lang = f[dir.length+1..-1]
7
- Dir.chdir(f) do
8
- rake("features")
7
+ if supported?(lang)
8
+ Dir.chdir(f) do
9
+ rake("features")
10
+ end
11
+ else
12
+ STDERR.puts %{
13
+ !!!!!
14
+ !!!!! SKIPPING #{lang} (Haven't made it work on Ruby 1.9 yet)
15
+ !!!!!
16
+ }
9
17
  end
10
18
  end
11
19
  end
12
20
  end
13
21
 
22
+ def supported?(lang)
23
+ if RUBY_VERSION =~ /^1\.9/
24
+ !%w{ar ja ko zh-CN}.index(lang)
25
+ else
26
+ true
27
+ end
28
+ end
29
+
14
30
  def rake(args)
15
31
  ruby(File.join(Gem.bindir, 'rake'), args)
16
32
  end
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'kalkulator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculador'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'kalkulaator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculatrice'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calcolatrice'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  $KCODE = 'e'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'kalkulator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculadora'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'kalkulator'
@@ -1,4 +1,5 @@
1
- require 'spec'
1
+ # encoding: utf-8
2
+ require 'spec/expectations'
2
3
  $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
4
  require 'cucumber/formatters/unicode'
4
5
  require 'calculator'
@@ -1,4 +1,4 @@
1
- require 'spec' # so we can call .should
1
+ require 'spec/expectations' # so we can call .should
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__) + '/../../src') # so the jar is found
3
3
  require 'cucumber_demo' # puts the jar on the classpath
4
4
  include_class 'cucumber.demo.Hello'
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
  include_class 'java.util.TreeSet'
3
3
 
4
4
  Given /I have an empty set/ do
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
  require 'selenium'
3
3
 
4
4
  class GoogleSearch
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
 
3
3
  World do
4
4
  Object.new
@@ -0,0 +1,16 @@
1
+ Here you'll find examples for Watir, FireWatir, SafariWatir and Celerity.
2
+ All of these browser libraries have the same API, so the example code will
3
+ work with all of them.
4
+
5
+ Just run with:
6
+
7
+ rake features
8
+
9
+ This will use Watir/IE if you're on Windows, and SafariWatir/Safari if you're on OS X.
10
+ You can force the use of FireWatir/Firefox on any platform like this:
11
+
12
+ rake features FIREWATIR=true
13
+
14
+ And finally, you can use Celerity by running in JRuby:
15
+
16
+ jruby -S rake features
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
 
3
3
  if ENV['FIREWATIR']
4
4
  require 'firewatir'
@@ -8,14 +8,14 @@ EOS
8
8
  end
9
9
 
10
10
  def require_spec
11
- require 'spec'
11
+ require 'spec/expectations'
12
12
  rescue LoadError
13
13
  require_spec_with_rubygems
14
14
  end
15
15
 
16
16
  def require_spec_with_rubygems
17
17
  require 'rubygems'
18
- require 'spec'
18
+ require 'spec/expectations'
19
19
  rescue LoadError
20
20
  unable_to_load
21
21
  end
@@ -3,7 +3,7 @@ class FeatureCompiler
3
3
  require 'yaml'
4
4
  require 'erb'
5
5
 
6
- @tt = PLATFORM =~ /mswin|mingw/ ? 'tt.bat' : 'tt'
6
+ @tt = RUBY_PLATFORM =~ /mswin|mingw/ ? 'tt.bat' : 'tt'
7
7
 
8
8
  @template = ERB.new(IO.read(File.dirname(__FILE__) + '/../lib/cucumber/treetop_parser/feature.treetop.erb'))
9
9
  @langs = YAML.load_file(File.dirname(__FILE__) + '/../lib/cucumber/languages.yml')
@@ -122,6 +122,6 @@ module Autotest::CucumberMixin
122
122
  else
123
123
  scenario_args = scenarios_to_run.map { |s| "-s '#{s}'" }.join(' ')
124
124
  end
125
- return "#{Cucumber::RUBY} #{Cucumber::BINARY} #{args} #{scenario_args}"
125
+ return "#{Cucumber::RUBY_BINARY} #{Cucumber::BINARY} #{args} #{scenario_args}"
126
126
  end
127
127
  end
@@ -1,5 +1,6 @@
1
1
  require 'optparse'
2
2
  require 'cucumber'
3
+ require 'ostruct'
3
4
 
4
5
  module Cucumber
5
6
  class YmlLoadError < StandardError; end
@@ -344,7 +345,7 @@ Defined profiles in cucumber.yml:
344
345
  def enable_diffing
345
346
  if defined?(::Spec)
346
347
  require 'spec/expectations/differs/default'
347
- options = ::Spec::Runner::Options.new(nil, nil)
348
+ options = OpenStruct.new(:diff_format => :unified, :context_lines => 3)
348
349
  ::Spec::Expectations.differ = ::Spec::Expectations::Differs::Default.new(options)
349
350
  end
350
351
  end
@@ -20,7 +20,7 @@ class String
20
20
  s
21
21
  end
22
22
 
23
- if (Cucumber::JRUBY && Cucumber::RAILS)
23
+ if (Cucumber::JRUBY && Cucumber::RAILS) || Cucumber::RUBY_1_9
24
24
  # Workaround for http://tinyurl.com/55uu3u
25
25
  alias jlength length
26
26
  else
@@ -19,7 +19,7 @@ Term::ANSIColor.coloring = false if !STDOUT.tty? || (Cucumber::WINDOWS && !Cucum
19
19
  module Cucumber
20
20
  module Formatters
21
21
  # Defines aliases for coloured output. You can tweak the colours by defining
22
- # a <tt>Cucumber::COLORS</tt> variable in your shell, very much like you can
22
+ # a <tt>CUCUMBER_COLORS</tt> variable in your shell, very much like you can
23
23
  # tweak the familiar POSIX command <tt>ls</tt> with
24
24
  # <a href="http://mipsisrisc.com/rambling/2008/06/27/lscolorsls_colors-now-with-linux-support/">$LSCOLORS/$LS_COLORS</a>
25
25
  #
@@ -178,15 +178,16 @@ module Cucumber
178
178
 
179
179
  print_pending_messages if @pending_messages.any?
180
180
 
181
- @io.puts "#{@total_scenario_count} scenarios"
181
+ @io.puts dump_count(@total_scenario_count, "scenario")
182
182
 
183
- @io.puts pending("#{@pending_scenarios.length} scenarios pending") if @pending_scenarios.any?
183
+ @io.puts pending(dump_count(@pending_scenarios.length, "scenario", "pending")) if @pending_scenarios.any?
184
+
185
+ @io.puts passed(dump_count(@passed.length, "step", "passed")) if @passed.any?
186
+ @io.puts passed(dump_count(@failed.length, "step", "failed")) if @failed.any?
187
+ @io.puts passed(dump_count(@skipped.length, "step", "skipped")) if @skipped.any?
184
188
 
185
- @io.puts passed("#{@passed.length} steps passed") if @passed.any?
186
- @io.puts failed("#{@failed.length} steps failed") if @failed.any?
187
- @io.puts skipped("#{@skipped.length} steps skipped") if @skipped.any?
188
189
  if @pending_steps.any?
189
- @io.print pending("#{@pending_steps.length} steps pending")
190
+ @io.print pending(dump_count(@pending_steps.length, "step", "pending"))
190
191
  @io.print pending(" (#{number_of_unimplemented_steps} with no step definition)") if number_of_unimplemented_steps > 0
191
192
  @io.puts
192
193
  end
@@ -195,6 +196,10 @@ module Cucumber
195
196
 
196
197
  print_snippets if @options[:snippets]
197
198
  end
199
+
200
+ def dump_count(count, what, state=nil)
201
+ return [count, "#{what}#{count == 1 ? '' : 's'}", state].compact.join(" ")
202
+ end
198
203
 
199
204
  def print_pending_messages
200
205
  @io.puts "Pending Notes:"
@@ -2,7 +2,7 @@
2
2
  require 'cucumber/platform'
3
3
  require 'cucumber/formatters/ansicolor'
4
4
 
5
- $KCODE='u'
5
+ $KCODE='u' unless Cucumber::RUBY_1_9
6
6
 
7
7
  if Cucumber::WINDOWS_MRI && `chcp` =~ /Active code page: (\d+)/
8
8
  codepage = $1.to_i
@@ -258,3 +258,14 @@
258
258
  then: 那么
259
259
  and: 而且
260
260
  but: 但是
261
+ # Korean
262
+ "ko":
263
+ feature: 기능
264
+ scenario: 예
265
+ more_examples: 다른 예
266
+ given_scenario: 주어진 예
267
+ given: 조건
268
+ when: 만일
269
+ then: 그러면
270
+ and: 그리고
271
+ but: 하지만
@@ -10,7 +10,8 @@ module Cucumber
10
10
  WINDOWS = Config::CONFIG['host_os'] =~ /mswin|mingw/
11
11
  WINDOWS_MRI = WINDOWS && !JRUBY && !IRONRUBY
12
12
  RAILS = defined?(Rails)
13
- RUBY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
13
+ RUBY_BINARY = File.join(Config::CONFIG['bindir'], Config::CONFIG['ruby_install_name'])
14
+ RUBY_1_9 = RUBY_VERSION =~ /^1\.9/
14
15
 
15
16
  class << self
16
17
  attr_reader :language
@@ -1,4 +1,4 @@
1
- require 'spec'
1
+ require 'spec/expectations'
2
2
  require 'spec/rails'
3
3
 
4
4
  # Hack to stop RSpec from dumping the summary
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -20,7 +20,9 @@ module Cucumber
20
20
  end
21
21
 
22
22
  def parse_feature(file)
23
- ast = parse(IO.read(file))
23
+ gherkin = IO.read(file)
24
+ gherkin = gherkin.force_encoding('utf-8') if Cucumber::RUBY_1_9
25
+ ast = parse(gherkin)
24
26
  if ast.nil?
25
27
  raise SyntaxError.new(file, self)
26
28
  else
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -1,3 +1,4 @@
1
+ # encoding: utf-8
1
2
  module Cucumber
2
3
  # :stopdoc:
3
4
  module TreetopParser
@@ -2,8 +2,8 @@ module Cucumber #:nodoc:
2
2
  class VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 13
6
- PATCH = 4 # Set to nil for official release
5
+ TINY = 14
6
+ PATCH = 2 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
@@ -86,7 +86,14 @@ module Cucumber
86
86
  it "should display as pending in the dump" do
87
87
  @formatter.scenario_executing(@scenario)
88
88
  @formatter.dump
89
- @io.string.should include("1 scenarios pending")
89
+ @io.string.should include("1 scenario pending")
90
+ end
91
+
92
+ it "should display as pending in the dump (with two scenarios)" do
93
+ @formatter.scenario_executing(@scenario)
94
+ @formatter.scenario_executing(@scenario)
95
+ @formatter.dump
96
+ @io.string.should include("2 scenarios pending")
90
97
  end
91
98
  end
92
99
 
@@ -315,16 +322,40 @@ module Cucumber
315
322
  io.string.should include("1 with no step definition")
316
323
  end
317
324
 
318
- it "should display the total number of scenarios executed" do
325
+ it "should display the total number of scenarios executed (for 0 scenarios)" do
319
326
  io = StringIO.new
320
327
  formatter = PrettyFormatter.new io, mock('step_mother')
321
328
 
329
+ formatter.dump
330
+
331
+ io.string.should include("0 scenarios")
332
+ end
333
+
334
+ it "should display the total number of scenarios executed (for 1 scenario)" do
335
+ io = StringIO.new
336
+ formatter = PrettyFormatter.new io, mock('step_mother')
337
+
338
+ formatter.scenario_executing(mock_scenario)
339
+ formatter.scenario_executed(mock_scenario)
340
+
341
+ formatter.dump
342
+
343
+ io.string.should include("1 scenario")
344
+ end
345
+
346
+ it "should display the total number of scenarios executed (for 2 scenarios)" do
347
+ io = StringIO.new
348
+ formatter = PrettyFormatter.new io, mock('step_mother')
349
+
350
+ formatter.scenario_executing(mock_scenario)
351
+ formatter.scenario_executed(mock_scenario)
352
+
322
353
  formatter.scenario_executing(mock_scenario)
323
354
  formatter.scenario_executed(mock_scenario)
324
355
 
325
356
  formatter.dump
326
357
 
327
- io.string.should include("1 scenarios")
358
+ io.string.should include("2 scenarios")
328
359
  end
329
360
 
330
361
  describe "colour" do
@@ -1,6 +1,6 @@
1
1
  require 'rubygems'
2
2
  gem 'rspec'
3
- require 'spec'
3
+ require 'spec/expectations'
4
4
 
5
5
  ENV['CUCUMBER_COLORS']=nil
6
6
  $KCODE='u'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aslakhellesoy-cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13.3
4
+ version: 0.1.14.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-29 00:00:00 -08:00
12
+ date: 2009-01-05 00:00:00 -08:00
13
13
  default_executable: cucumber
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -160,7 +160,6 @@ files:
160
160
  - examples/java/features/step_definitons/hello_steps.rb
161
161
  - examples/java/features/step_definitons/tree_steps.rb
162
162
  - examples/java/features/tree.feature
163
- - examples/java/src/cucumber/demo/Hello.java
164
163
  - examples/selenium/Rakefile
165
164
  - examples/selenium/features/search.feature
166
165
  - examples/selenium/features/step_definitons/stories_steps.rb
@@ -175,6 +174,7 @@ files:
175
174
  - examples/tickets/features/step_definitons/scenario_outline_steps.rb
176
175
  - examples/tickets/features/step_definitons/tickets_steps.rb
177
176
  - examples/tickets/features/tickets.feature
177
+ - examples/watir/README.textile
178
178
  - examples/watir/Rakefile
179
179
  - examples/watir/features/search.feature
180
180
  - examples/watir/features/step_definitons/search_steps.rb
@@ -1,16 +0,0 @@
1
- package cucumber.demo;
2
-
3
- public class Hello {
4
- public String greet(String who, String from) {
5
- return "Hi, " + who + ". I'm " + from;
6
- }
7
-
8
- public boolean isFriend(String who) {
9
- return true;
10
- }
11
-
12
- public String getPhoneNumber(String who) {
13
- throw new RuntimeException("NOPE");
14
- //return "98219458";
15
- }
16
- }