cucumber 0.3.102 → 0.3.103

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.
Files changed (47) hide show
  1. data/History.txt +18 -0
  2. data/Manifest.txt +6 -2
  3. data/examples/java/README.textile +3 -3
  4. data/examples/self_test/features/sample.feature +1 -1
  5. data/examples/self_test/features/search_sample.feature +1 -1
  6. data/features/custom_formatter.feature +4 -4
  7. data/features/steps_formatter.feature +2 -1
  8. data/lib/cucumber/ast.rb +1 -0
  9. data/lib/cucumber/ast/table.rb +4 -4
  10. data/lib/cucumber/ast/tree_walker.rb +185 -0
  11. data/lib/cucumber/ast/visitor.rb +2 -106
  12. data/lib/cucumber/cli/configuration.rb +28 -28
  13. data/lib/cucumber/cli/language_help_formatter.rb +5 -7
  14. data/lib/cucumber/cli/main.rb +3 -3
  15. data/lib/cucumber/core_ext/string.rb +0 -22
  16. data/lib/cucumber/formatter/html.rb +203 -113
  17. data/lib/cucumber/formatter/junit.rb +29 -23
  18. data/lib/cucumber/formatter/pdf.rb +74 -69
  19. data/lib/cucumber/formatter/pretty.rb +93 -78
  20. data/lib/cucumber/formatter/profile.rb +2 -2
  21. data/lib/cucumber/formatter/progress.rb +16 -10
  22. data/lib/cucumber/formatter/rerun.rb +4 -5
  23. data/lib/cucumber/formatter/steps.rb +6 -7
  24. data/lib/cucumber/formatter/tag_cloud.rb +7 -6
  25. data/lib/cucumber/formatter/usage.rb +7 -10
  26. data/lib/cucumber/language_support/step_definition_methods.rb +4 -4
  27. data/lib/cucumber/rails/action_controller.rb +1 -1
  28. data/lib/cucumber/rails/active_record.rb +27 -14
  29. data/lib/cucumber/rb_support/rb_language.rb +5 -0
  30. data/lib/cucumber/rb_support/rb_step_definition.rb +9 -16
  31. data/lib/cucumber/rb_support/regexp_argument_matcher.rb +21 -0
  32. data/lib/cucumber/step_argument.rb +9 -0
  33. data/lib/cucumber/step_match.rb +24 -5
  34. data/lib/cucumber/version.rb +1 -1
  35. data/rails_generators/cucumber/templates/env.rb +14 -0
  36. data/spec/cucumber/ast/background_spec.rb +1 -2
  37. data/spec/cucumber/ast/scenario_outline_spec.rb +3 -2
  38. data/spec/cucumber/ast/scenario_spec.rb +1 -1
  39. data/spec/cucumber/ast/tree_walker_spec.rb +18 -0
  40. data/spec/cucumber/formatter/html_spec.rb +221 -2
  41. data/spec/cucumber/formatter/progress_spec.rb +9 -4
  42. data/spec/cucumber/parser/feature_parser_spec.rb +31 -27
  43. data/spec/cucumber/rb_support/regexp_argument_matcher_spec.rb +18 -0
  44. data/spec/cucumber/step_match_spec.rb +40 -0
  45. metadata +8 -4
  46. data/lib/cucumber/rb_support/rb_group.rb +0 -11
  47. data/spec/cucumber/core_ext/string_spec.rb +0 -41
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cucumber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.102
4
+ version: 0.3.103
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: 2009-09-22 00:00:00 +02:00
12
+ date: 2009-09-24 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -407,6 +407,7 @@ files:
407
407
  - lib/cucumber/ast/step_invocation.rb
408
408
  - lib/cucumber/ast/table.rb
409
409
  - lib/cucumber/ast/tags.rb
410
+ - lib/cucumber/ast/tree_walker.rb
410
411
  - lib/cucumber/ast/visitor.rb
411
412
  - lib/cucumber/broadcaster.rb
412
413
  - lib/cucumber/cli/configuration.rb
@@ -463,13 +464,14 @@ files:
463
464
  - lib/cucumber/rails/world.rb
464
465
  - lib/cucumber/rake/task.rb
465
466
  - lib/cucumber/rb_support/rb_dsl.rb
466
- - lib/cucumber/rb_support/rb_group.rb
467
467
  - lib/cucumber/rb_support/rb_hook.rb
468
468
  - lib/cucumber/rb_support/rb_language.rb
469
469
  - lib/cucumber/rb_support/rb_step_definition.rb
470
470
  - lib/cucumber/rb_support/rb_transform.rb
471
471
  - lib/cucumber/rb_support/rb_world.rb
472
+ - lib/cucumber/rb_support/regexp_argument_matcher.rb
472
473
  - lib/cucumber/rspec_neuter.rb
474
+ - lib/cucumber/step_argument.rb
473
475
  - lib/cucumber/step_match.rb
474
476
  - lib/cucumber/step_mother.rb
475
477
  - lib/cucumber/version.rb
@@ -498,6 +500,7 @@ files:
498
500
  - spec/cucumber/ast/step_collection_spec.rb
499
501
  - spec/cucumber/ast/step_spec.rb
500
502
  - spec/cucumber/ast/table_spec.rb
503
+ - spec/cucumber/ast/tree_walker_spec.rb
501
504
  - spec/cucumber/broadcaster_spec.rb
502
505
  - spec/cucumber/cli/configuration_spec.rb
503
506
  - spec/cucumber/cli/drb_client_spec.rb
@@ -505,7 +508,6 @@ files:
505
508
  - spec/cucumber/cli/options_spec.rb
506
509
  - spec/cucumber/cli/profile_loader_spec.rb
507
510
  - spec/cucumber/core_ext/proc_spec.rb
508
- - spec/cucumber/core_ext/string_spec.rb
509
511
  - spec/cucumber/formatter/ansicolor_spec.rb
510
512
  - spec/cucumber/formatter/color_io_spec.rb
511
513
  - spec/cucumber/formatter/duration_spec.rb
@@ -514,7 +516,9 @@ files:
514
516
  - spec/cucumber/parser/feature_parser_spec.rb
515
517
  - spec/cucumber/parser/table_parser_spec.rb
516
518
  - spec/cucumber/rb_support/rb_step_definition_spec.rb
519
+ - spec/cucumber/rb_support/regexp_argument_matcher_spec.rb
517
520
  - spec/cucumber/sell_cucumbers.feature
521
+ - spec/cucumber/step_match_spec.rb
518
522
  - spec/cucumber/step_mother_spec.rb
519
523
  - spec/cucumber/treetop_parser/empty_feature.feature
520
524
  - spec/cucumber/treetop_parser/empty_scenario.feature
@@ -1,11 +0,0 @@
1
- module Cucumber
2
- module RbSupport
3
- class RbGroup
4
- attr_reader :val, :start
5
-
6
- def initialize(val, start)
7
- @val, @start = val, start
8
- end
9
- end
10
- end
11
- end
@@ -1,41 +0,0 @@
1
- require File.dirname(__FILE__) + '/../../spec_helper'
2
- require 'cucumber/core_ext/string'
3
- require 'cucumber/rb_support/rb_group'
4
-
5
- describe String, "#gzub" do
6
- def groups(a)
7
- a.map{|c| Cucumber::RbSupport::RbGroup.new(c[0], c[1])}
8
- end
9
-
10
- it "should format groups with format string" do
11
- "I ate 1 egg this morning".gzub(groups([['ate', 2], ['1', 6], ['egg', 8], ['morning', 17]]), "<span>%s</span>").should ==
12
- "I <span>ate</span> <span>1</span> <span>egg</span> this <span>morning</span>"
13
- end
14
-
15
- it "should format groups with format string when there are dupes" do
16
- "I bob 1 bo this bobs".gzub(groups([['bob', 2], ['1', 6], ['bo', 8], ['bobs', 16]]), "<span>%s</span>").should ==
17
- "I <span>bob</span> <span>1</span> <span>bo</span> this <span>bobs</span>"
18
- end
19
-
20
- it "should format groups with block" do
21
- f = "I ate 1 egg this morning".gzub(groups([['ate', 2], ['1', 6], ['egg', 8], ['morning', 17]])) do |m|
22
- "<span>#{m}</span>"
23
- end
24
- f.should == "I <span>ate</span> <span>1</span> <span>egg</span> this <span>morning</span>"
25
- end
26
-
27
- it "should format groups with proc object" do
28
- proc = lambda do |m|
29
- "<span>#{m}</span>"
30
- end
31
- f = "I ate 1 egg this morning".gzub(groups([['ate', 2], ['1', 6], ['egg', 8], ['morning', 17]]), proc)
32
- f.should == "I <span>ate</span> <span>1</span> <span>egg</span> this <span>morning</span>"
33
- end
34
-
35
- it "should format groups with block with not all placeholders having a value" do
36
- f = "another member named Bob joins the group".gzub(groups([['another', 0], ['member', 8], ['Bob', 21]])) do |m|
37
- "<span>#{m}</span>"
38
- end
39
- f.should == "<span>another</span> <span>member</span> named <span>Bob</span> joins the group"
40
- end
41
- end