aslakhellesoy-cucumber 0.1.99.2 → 0.1.99.3

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.
@@ -1,4 +1,4 @@
1
- == Git (future 0.2)
1
+ == Git (0.2 alpha)
2
2
 
3
3
  This is a major rewrite of Cucumber's internals. The rewrite was done to address technical
4
4
  debt and to have a codebase that is easier to evolve and maintain. There are some major
@@ -57,27 +57,34 @@ Scenario Outlines, the rich command line, the nice output format and everything
57
57
  pure Ruby users have been enjoying for a while.
58
58
 
59
59
  == Bugfixes
60
+ * No output for multi-line strings (#71 Aslak Hellesøy)
61
+ * Fix cucumber/formatters/unicode flaws on Windows (#145 Michael)
62
+ * Autotest-related Bugs: YAML missing (#136 Tobias Pape)
63
+ * Overeager "rescue LoadError" hides lots of errors (#137 Jonathan del Strother)
60
64
  * Pending steps in > steps called from steps (#65 Aslak Hellesøy)
61
65
 
62
66
  === New features
63
- * Run cucumber with --autoformat DIR to reformat (pretty print) all of your feature files.
64
- * New --strict option exits with an error code if there are undefined or pending steps.
65
- * Filtering with --tags. If you put @various @tags on your features and scenarios, --tags lets you run a subset of them.
67
+ * Tagging scenarios and features. Pick the ones to run with --tags (#54 Aslak Hellesøy)
68
+ * Make the current scenario available to the steps. (#44 Aslak Hellesøy)
69
+ * Step definition snippets contain a 'pending' call (#84 Aslak Hellesøy)
70
+ * Call multiline steps from other steps (#144 Aslak Hellesøy)
71
+ * Run cucumber with --autoformat DIR to reformat (pretty print) all of your feature files. (Aslak Hellesøy)
72
+ * New --strict option exits with an error code if there are undefined or pending steps. (Aslak Hellesøy)
66
73
  * Given, When, Then are automatically aliased to current language.
67
74
  Ruby 1.8 doesn't allow non-ascii method names in the source, so unless you're on 1.9
68
75
  you will have to use Given, When, Then or set up your own aliases. Here is Norwegian:
69
- Cucumber.alias_steps(%w{Naar Saa}) # Når, Så already aliased, but can't be called.
70
- * Run cucumber --language help to see all supported languages.
71
- * Run cucumber --language LANG help to see keywords for a given language.
72
- * Multiline arguments (tables and """ strings) are printed in the output
73
- * It's no longer necessary to compile the Treetop grammar when adding a new language. Localised parser is generated at runtime.
76
+ Cucumber.alias_steps(%w{Naar Saa}) # Når, Så already aliased, but can't be called. (Aslak Hellesøy)
77
+ * Run cucumber --language help to see all supported languages. (Aslak Hellesøy)
78
+ * Run cucumber --language LANG help to see keywords for a given language. (Aslak Hellesøy)
79
+ * Multiline arguments (tables and """ strings) are printed in the output. (Aslak Hellesøy)
80
+ * It's no longer necessary to compile the Treetop grammar when adding a new language. Localised parser is generated at runtime. (Aslak Hellesøy)
74
81
 
75
82
  === Removed features
76
83
  * "GivenScenario" is gone. Instead you can call Steps from Steps, or wait for "Background (#153)"
77
84
  * "More Examples" is gone. "Scenario" + "More Examples" is no longer supported. Use "Scenario Outline" + "Examples" instead.
78
85
  * Pure Ruby features are no longer supported.
79
86
 
80
- == 0.1.16.x (Master)
87
+ == 0.1.16
81
88
 
82
89
  Bugfix release.
83
90
 
@@ -4,6 +4,12 @@ World do
4
4
  Object.new
5
5
  end
6
6
 
7
+ After do |scenario|
8
+ if scenario.status.index(:failed)
9
+ # Call the BDD police
10
+ end
11
+ end
12
+
7
13
  Given "be_empty" do
8
14
  [1,2].should_not be_empty
9
15
  end
@@ -16,6 +22,7 @@ Given "nested step is called" do
16
22
  end
17
23
 
18
24
  Given 'nested step is called using text table' do
25
+ pending
19
26
  Given "I like mushroom", table(%{
20
27
  | sponge | bob |
21
28
  | is | cool |
@@ -28,9 +28,11 @@ Feature: Cucumber command line
28
28
  @two @three
29
29
  Scenario: Missing
30
30
  Given missing
31
+ Undefined step: "missing" (Cucumber::StepMother::Undefined)
32
+ features/sample.feature:6:in `Given missing'
31
33
 
32
34
  1 scenario
33
- 1 undefined step
35
+ 1 failed step
34
36
 
35
37
  """
36
38
 
@@ -24,6 +24,7 @@ Feature: Cucumber command line
24
24
  You can implement step definitions for missing steps with these snippets:
25
25
 
26
26
  Given /^this does not exist$/ do
27
+ pending
27
28
  end
28
29
 
29
30
 
@@ -1,5 +1,6 @@
1
1
  require 'autotest'
2
2
  require 'tempfile'
3
+ require 'yaml'
3
4
  require File.dirname(__FILE__) + '/../cucumber'
4
5
 
5
6
  module Autotest::CucumberMixin
@@ -9,6 +9,10 @@ module Cucumber
9
9
  @steps = steps
10
10
  end
11
11
 
12
+ def status
13
+ @steps.map{|step| step.status}
14
+ end
15
+
12
16
  def tagged_with?(tag_names)
13
17
  @tags.among?(tag_names) || @feature.tagged_with?(tag_names, false)
14
18
  end
@@ -82,14 +82,17 @@ module Cucumber
82
82
  else
83
83
  @status = :skipped
84
84
  end
85
- rescue StepMother::Undefined
86
- @status = :undefined
87
- rescue StepMother::Pending
88
- @status = :pending
85
+ rescue StepMother::Undefined => exception
86
+ if visitor.options[:strict]
87
+ exception.set_backtrace([])
88
+ failed(exception)
89
+ else
90
+ @status = :undefined
91
+ end
92
+ rescue StepMother::Pending => exception
93
+ visitor.options[:strict] ? failed(exception) : @status = :pending
89
94
  rescue Exception => exception
90
- @status = :failed
91
- @exception = exception
92
- @exception.backtrace << backtrace_line unless backtrace_line.nil?
95
+ failed(exception)
93
96
  end
94
97
  @scenario.step_executed(self) if @scenario
95
98
  end
@@ -125,6 +128,12 @@ module Cucumber
125
128
  arg.arguments_replaced(arguments)
126
129
  end
127
130
  end
131
+
132
+ def failed(exception)
133
+ @status = :failed
134
+ @exception = exception
135
+ @exception.backtrace << backtrace_line unless backtrace_line.nil?
136
+ end
128
137
  end
129
138
  end
130
139
  end
@@ -27,7 +27,7 @@ module Cucumber
27
27
  end
28
28
 
29
29
  attr_reader :options, :paths
30
- FORMATS = %w{pretty profile progress html autotest}
30
+ FORMATS = %w{pretty profile progress rerun}
31
31
  DEFAULT_FORMAT = 'pretty'
32
32
 
33
33
  def initialize(out_stream = STDOUT, error_stream = STDERR)
@@ -4,7 +4,7 @@ require 'cucumber/formatter/ansicolor'
4
4
 
5
5
  $KCODE='u' unless Cucumber::RUBY_1_9
6
6
 
7
- if Cucumber::WINDOWS_MRI && `chcp` =~ /Active code page: (\d+)/
7
+ if Cucumber::WINDOWS_MRI && `chcp` =~ /(\d+)/
8
8
  codepage = $1.to_i
9
9
  codepages = (1251..1252)
10
10
 
@@ -13,7 +13,7 @@ module Cucumber
13
13
  class StepDefinition
14
14
  def self.snippet_text(step_keyword, step_name)
15
15
  escaped = Regexp.escape(step_name).gsub('\ ', ' ').gsub('/', '\/')
16
- "#{step_keyword} /^#{escaped}$/ do\nend"
16
+ "#{step_keyword} /^#{escaped}$/ do\n pending\nend"
17
17
  end
18
18
 
19
19
  class MissingProc < StandardError
@@ -71,7 +71,7 @@ module Cucumber
71
71
  yield world
72
72
  ensure
73
73
  (@after_procs ||= []).each do |proc|
74
- world.cucumber_instance_exec(false, 'After', scenario, &proc) rescue nil
74
+ world.cucumber_instance_exec(false, 'After', scenario, &proc)
75
75
  end
76
76
  end
77
77
  end
@@ -3,7 +3,7 @@ module Cucumber #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
5
  TINY = 99
6
- PATCH = 2 # Set to nil for official release
6
+ PATCH = 3 # Set to nil for official release
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PATCH].compact.join('.')
9
9
  end
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
  begin
3
3
  load File.expand_path(File.dirname(__FILE__) + "/../vendor/plugins/cucumber/bin/cucumber")
4
- rescue LoadError
4
+ rescue LoadError => e
5
+ raise unless e.to_s =~ /cucumber/
5
6
  require "rubygems"
6
7
  load File.join(Gem.bindir, "cucumber")
7
8
  end
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.99.2
4
+ version: 0.1.99.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Aslak Helles\xC3\xB8y"