This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Manifest.txt b/Manifest.txt | |
index ebc9f6d..81112d1 100644 | |
--- a/Manifest.txt | |
+++ b/Manifest.txt | |
@@ -6,6 +6,7 @@ Rakefile | |
bin/cucumber | |
config/hoe.rb | |
config/requirements.rb | |
+cucumber.gemspec | |
cucumber.yml | |
examples/cs/README.textile | |
examples/cs/Rakefile | |
@@ -166,15 +167,20 @@ examples/self_test/Rakefile | |
examples/self_test/features/background/background_with_name.feature | |
examples/self_test/features/background/failing_background.feature | |
examples/self_test/features/background/failing_background_after_success.feature | |
+examples/self_test/features/background/missing_background.feature | |
examples/self_test/features/background/multiline_args_background.feature | |
examples/self_test/features/background/passing_background.feature | |
-examples/self_test/features/background/pending_background.feature | |
examples/self_test/features/background/scenario_outline_failing_background.feature | |
examples/self_test/features/background/scenario_outline_passing_background.feature | |
examples/self_test/features/call_undefined_step_from_step_def.feature | |
examples/self_test/features/failing_expectation.feature | |
examples/self_test/features/lots_of_undefined.feature | |
examples/self_test/features/multiline_name.feature | |
+examples/self_test/features/must_not_pass/failing.feature | |
+examples/self_test/features/must_not_pass/outline.feature | |
+examples/self_test/features/must_not_pass/passing.feature | |
+examples/self_test/features/must_not_pass/pending.feature | |
+examples/self_test/features/must_not_pass/unimplemented.feature | |
examples/self_test/features/outline_sample.feature | |
examples/self_test/features/sample.feature | |
examples/self_test/features/search_sample.feature | |
@@ -233,8 +239,11 @@ features/cucumber_cli.feature | |
features/cucumber_cli_diff_disabled.feature | |
features/cucumber_cli_outlines.feature | |
features/custom_formatter.feature | |
+features/in_progress_rake_task.feature | |
features/multiline_names.feature | |
+features/must_not_pass.feature | |
features/rake_task.feature | |
+features/regression_rake_task.feature | |
features/report_called_undefined_steps.feature | |
features/snippet.feature | |
features/step_definitions/cucumber_steps.rb | |
@@ -312,6 +321,8 @@ lib/cucumber/step_match.rb | |
lib/cucumber/step_mother.rb | |
lib/cucumber/version.rb | |
lib/cucumber/world.rb | |
+logos/gideon-bullock-1.png | |
+logos/gideon-bullock-2.png | |
rails_generators/cucumber/USAGE | |
rails_generators/cucumber/cucumber_generator.rb | |
rails_generators/cucumber/templates/cucumber | |
@@ -324,6 +335,7 @@ rails_generators/feature/feature_generator.rb | |
rails_generators/feature/templates/feature.erb | |
rails_generators/feature/templates/steps.erb | |
spec/cucumber/ast/background_spec.rb | |
+spec/cucumber/ast/example_cells_spec.rb | |
spec/cucumber/ast/feature_element_spec.rb | |
spec/cucumber/ast/feature_factory.rb | |
spec/cucumber/ast/feature_spec.rb | |
diff --git a/cucumber.gemspec b/cucumber.gemspec | |
index ebb49dc..731ab94 100644 | |
--- a/cucumber.gemspec | |
+++ b/cucumber.gemspec | |
@@ -6,13 +6,13 @@ Gem::Specification.new do |s| | |
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | |
s.authors = ["Aslak Helles\303\270y"] | |
- s.date = %q{2009-04-28} | |
+ s.date = %q{2009-05-11} | |
s.default_executable = %q{cucumber} | |
s.description = %q{Executable Feature scenarios} | |
s.email = ["aslak.hellesoy@gmail.com"] | |
s.executables = ["cucumber"] | |
s.extra_rdoc_files = ["History.txt", "License.txt", "Manifest.txt", "README.txt"] | |
- s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/cucumber", "config/hoe.rb", "config/requirements.rb", "cucumber.yml", "examples/cs/README.textile", "examples/cs/Rakefile", "examples/cs/compile.bat", "examples/cs/features/addition.feature", "examples/cs/features/step_definitons/calculator_steps.rb", "examples/cs/src/demo/Calculator.cs", "examples/dos_line_endings/Rakefile", "examples/dos_line_endings/features/dos_line_endings.feature", "examples/i18n/README.textile", "examples/i18n/Rakefile", "examples/i18n/ar/Rakefile", "examples/i18n/ar/features/addition.feature", "examples/i18n/ar/features/step_definitons/calculator_steps.rb", "examples/i18n/ar/lib/calculator.rb", "examples/i18n/bg/Rakefile", "examples/i18n/bg/features/addition.feature", "examples/i18n/bg/features/consecutive_calculations.feature", "examples/i18n/bg/features/division.feature", "examples/i18n/bg/features/step_definitons/calculator_steps.rb", "examples/i18n/bg/features/support/env.rb", "examples/i18n/bg/features/support/world.rb", "examples/i18n/bg/lib/calculator.rb", "examples/i18n/da/Rakefile", "examples/i18n/da/features/step_definitons/kalkulator_steps.rb", "examples/i18n/da/features/summering.feature", "examples/i18n/da/lib/kalkulator.rb", "examples/i18n/de/Rakefile", "examples/i18n/de/features/addition.feature", "examples/i18n/de/features/division.feature", "examples/i18n/de/features/step_definitons/calculator_steps.rb", "examples/i18n/de/lib/calculator.rb", "examples/i18n/en-lol/Rakefile", "examples/i18n/en-lol/features/step_definitions/cucumbrz_steps.rb", "examples/i18n/en-lol/features/stuffing.feature", "examples/i18n/en-lol/features/support/env.rb", "examples/i18n/en-lol/lib/basket.rb", "examples/i18n/en-lol/lib/belly.rb", "examples/i18n/en/Rakefile", "examples/i18n/en/features/addition.feature", "examples/i18n/en/features/division.feature", "examples/i18n/en/features/step_definitons/calculator_steps.rb", "examples/i18n/en/lib/calculator.rb", "examples/i18n/es/Rakefile", "examples/i18n/es/features/adicion.feature", "examples/i18n/es/features/step_definitons/calculador_steps.rb", "examples/i18n/es/lib/calculador.rb", "examples/i18n/et/Rakefile", "examples/i18n/et/features/jagamine.feature", "examples/i18n/et/features/liitmine.feature", "examples/i18n/et/features/step_definitions/kalkulaator_steps.rb", "examples/i18n/et/lib/kalkulaator.rb", "examples/i18n/fi/Rakefile", "examples/i18n/fi/features/jakolasku.feature", "examples/i18n/fi/features/step_definitons/laskin_steps.rb", "examples/i18n/fi/features/yhteenlasku.feature", "examples/i18n/fi/lib/laskin.rb", "examples/i18n/fr/Rakefile", "examples/i18n/fr/features/addition.feature", "examples/i18n/fr/features/step_definitions/calculatrice_steps.rb", "examples/i18n/fr/lib/calculatrice.rb", "examples/i18n/hu/Rakefile", "examples/i18n/hu/features/addition.feature", "examples/i18n/hu/features/division.feature", "examples/i18n/hu/features/step_definitons/calculator_steps.rb", "examples/i18n/hu/lib/calculator.rb", "examples/i18n/id/Rakefile", "examples/i18n/id/features/addition.feature", "examples/i18n/id/features/division.feature", "examples/i18n/id/features/step_definitons/calculator_steps.rb", "examples/i18n/id/lib/calculator.rb", "examples/i18n/it/Rakefile", "examples/i18n/it/features/somma.feature", "examples/i18n/it/features/step_definitons/calcolatrice_steps.rb", "examples/i18n/it/lib/calcolatrice.rb", "examples/i18n/ja/Rakefile", "examples/i18n/ja/features/addition.feature", "examples/i18n/ja/features/division.feature", "examples/i18n/ja/features/step_definitons/calculator_steps.rb", "examples/i18n/ja/lib/calculator.rb", "examples/i18n/ko/Rakefile", "examples/i18n/ko/features/addition.feature", "examples/i18n/ko/features/division.feature", "examples/i18n/ko/features/step_definitons/calculator_steps.rb", "examples/i18n/ko/lib/calculator.rb", "examples/i18n/lt/Rakefile", "examples/i18n/lt/features/addition.feature", "examples/i18n/lt/features/division.feature", "examples/i18n/lt/features/step_definitons/calculator_steps.rb", "examples/i18n/lt/lib/calculator.rb", "examples/i18n/lv/Rakefile", "examples/i18n/lv/features/addition.feature", "examples/i18n/lv/features/division.feature", "examples/i18n/lv/features/step_definitons/calculator_steps.rb", "examples/i18n/lv/lib/calculator.rb", "examples/i18n/no/Rakefile", "examples/i18n/no/features/step_definitons/kalkulator_steps.rb", "examples/i18n/no/features/summering.feature", "examples/i18n/no/features/support/env.rb", "examples/i18n/no/lib/kalkulator.rb", "examples/i18n/pt/Rakefile", "examples/i18n/pt/features/adicao.feature", "examples/i18n/pt/features/step_definitions/calculadora_steps.rb", "examples/i18n/pt/lib/calculadora.rb", "examples/i18n/ro/Rakefile", "examples/i18n/ro/features/step_definitons/calculator_steps.rb", "examples/i18n/ro/features/suma.feature", "examples/i18n/ro/lib/calculator.rb", "examples/i18n/ru/Rakefile", "examples/i18n/ru/features/addition.feature", "examples/i18n/ru/features/consecutive_calculations.feature", "examples/i18n/ru/features/division.feature", "examples/i18n/ru/features/step_definitons/calculator_steps.rb", "examples/i18n/ru/features/support/env.rb", "examples/i18n/ru/features/support/world.rb", "examples/i18n/ru/lib/calculator.rb", "examples/i18n/se/Rakefile", "examples/i18n/se/features/step_definitons/kalkulator_steps.rb", "examples/i18n/se/features/summering.feature", "examples/i18n/se/lib/kalkulator.rb", "examples/i18n/sk/Rakefile", "examples/i18n/sk/features/addition.feature", "examples/i18n/sk/features/division.feature", "examples/i18n/sk/features/step_definitons/calculator_steps.rb", "examples/i18n/sk/lib/calculator.rb", "examples/i18n/zh-CN/Rakefile", "examples/i18n/zh-CN/features/addition.feature", "examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb", "examples/i18n/zh-CN/lib/calculator.rb", "examples/i18n/zh-TW/Rakefile", "examples/i18n/zh-TW/features/addition.feature", "examples/i18n/zh-TW/features/division.feature", "examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb", "examples/i18n/zh-TW/lib/calculator.rb", "examples/java/README.textile", "examples/java/Rakefile", "examples/java/features/hello.feature", "examples/java/features/step_definitons/hello_steps.rb", "examples/java/features/step_definitons/tree_steps.rb", "examples/java/features/tree.feature", "examples/java/src/cucumber/demo/Hello.java", "examples/pure_java/README.textile", "examples/selenium/Rakefile", "examples/selenium/features/search.feature", "examples/selenium/features/step_definitons/search_steps.rb", "examples/selenium/features/support/env.rb", "examples/selenium_webrat/Rakefile", "examples/selenium_webrat/features/search.feature", "examples/selenium_webrat/features/step_definitons/search_steps.rb", "examples/selenium_webrat/features/support/env.rb", "examples/self_test/README.textile", "examples/self_test/Rakefile", "examples/self_test/features/background/background_with_name.feature", "examples/self_test/features/background/failing_background.feature", "examples/self_test/features/background/failing_background_after_success.feature", "examples/self_test/features/background/multiline_args_background.feature", "examples/self_test/features/background/passing_background.feature", "examples/self_test/features/background/pending_background.feature", "examples/self_test/features/background/scenario_outline_failing_background.feature", "examples/self_test/features/background/scenario_outline_passing_background.feature", "examples/self_test/features/call_undefined_step_from_step_def.feature", "examples/self_test/features/failing_expectation.feature", "examples/self_test/features/lots_of_undefined.feature", "examples/self_test/features/multiline_name.feature", "examples/self_test/features/outline_sample.feature", "examples/self_test/features/sample.feature", "examples/self_test/features/search_sample.feature", "examples/self_test/features/step_definitions/sample_steps.rb", "examples/self_test/features/support/env.rb", "examples/self_test/features/support/tag_count_formatter.rb", "examples/self_test/features/tons_of_cukes.feature", "examples/self_test/features/undefined_multiline_args.feature", "examples/sinatra/Rakefile", "examples/sinatra/app.rb", "examples/sinatra/features/add.feature", "examples/sinatra/features/step_definitions/add_steps.rb", "examples/sinatra/features/support/env.rb", "examples/sinatra/views/add.erb", "examples/sinatra/views/layout.erb", "examples/test_unit/Rakefile", "examples/test_unit/features/step_definitions/test_unit_steps.rb", "examples/test_unit/features/test_unit.feature", "examples/tickets/Rakefile", "examples/tickets/features/172.feature", "examples/tickets/features/177/1.feature", "examples/tickets/features/177/2.feature", "examples/tickets/features/177/3.feature", "examples/tickets/features/180.feature", "examples/tickets/features/229/tagged_hooks.feature", "examples/tickets/features/229/tagged_hooks.rb", "examples/tickets/features/236.feature", "examples/tickets/features/241.feature", "examples/tickets/features/246.feature", "examples/tickets/features/248.feature", "examples/tickets/features/270/back.feature", "examples/tickets/features/270/back.steps.rb", "examples/tickets/features/272/hooks.feature", "examples/tickets/features/272/hooks_steps.rb", "examples/tickets/features/279/py_string_indent.feature", "examples/tickets/features/279/py_string_indent.steps.rb", "examples/tickets/features/279/wrong.feature_", "examples/tickets/features/301/filter_background_tagged_hooks.feature", "examples/tickets/features/301/filter_background_tagged_hooks_steps.rb", "examples/tickets/features/306/only_background.feature", "examples/tickets/features/lib/eatting_machine.rb", "examples/tickets/features/lib/pantry.rb", "examples/tickets/features/scenario_outline.feature", "examples/tickets/features/step_definitons/246_steps.rb", "examples/tickets/features/step_definitons/248_steps.rb", "examples/tickets/features/step_definitons/scenario_outline_steps.rb", "examples/tickets/features/step_definitons/tickets_steps.rb", "examples/tickets/features/tickets.feature", "examples/watir/README.textile", "examples/watir/Rakefile", "examples/watir/features/search.feature", "examples/watir/features/step_definitons/search_steps.rb", "examples/watir/features/support/env.rb", "features/background.feature", "features/cucumber_cli.feature", "features/cucumber_cli_diff_disabled.feature", "features/cucumber_cli_outlines.feature", "features/custom_formatter.feature", "features/multiline_names.feature", "features/rake_task.feature", "features/report_called_undefined_steps.feature", "features/snippet.feature", "features/step_definitions/cucumber_steps.rb", "features/step_definitions/extra_steps.rb", "features/support/env.rb", "features/usage.feature", "gem_tasks/deployment.rake", "gem_tasks/environment.rake", "gem_tasks/features.rake", "gem_tasks/fix_cr_lf.rake", "gem_tasks/flog.rake", "gem_tasks/gemspec.rake", "gem_tasks/rspec.rake", "gem_tasks/yard.rake", "lib/autotest/cucumber.rb", "lib/autotest/cucumber_mixin.rb", "lib/autotest/cucumber_rails.rb", "lib/autotest/cucumber_rails_rspec.rb", "lib/autotest/cucumber_rspec.rb", "lib/autotest/discover.rb", "lib/cucumber.rb", "lib/cucumber/ast.rb", "lib/cucumber/ast/background.rb", "lib/cucumber/ast/comment.rb", "lib/cucumber/ast/examples.rb", "lib/cucumber/ast/feature.rb", "lib/cucumber/ast/feature_element.rb", "lib/cucumber/ast/features.rb", "lib/cucumber/ast/outline_table.rb", "lib/cucumber/ast/py_string.rb", "lib/cucumber/ast/scenario.rb", "lib/cucumber/ast/scenario_outline.rb", "lib/cucumber/ast/step.rb", "lib/cucumber/ast/step_collection.rb", "lib/cucumber/ast/step_invocation.rb", "lib/cucumber/ast/table.rb", "lib/cucumber/ast/tags.rb", "lib/cucumber/ast/visitor.rb", "lib/cucumber/broadcaster.rb", "lib/cucumber/cli/configuration.rb", "lib/cucumber/cli/language_help_formatter.rb", "lib/cucumber/cli/main.rb", "lib/cucumber/core_ext/exception.rb", "lib/cucumber/core_ext/instance_exec.rb", "lib/cucumber/core_ext/proc.rb", "lib/cucumber/core_ext/string.rb", "lib/cucumber/formatter.rb", "lib/cucumber/formatter/ansicolor.rb", "lib/cucumber/formatter/color_io.rb", "lib/cucumber/formatter/console.rb", "lib/cucumber/formatter/cucumber.css", "lib/cucumber/formatter/cucumber.sass", "lib/cucumber/formatter/html.rb", "lib/cucumber/formatter/pretty.rb", "lib/cucumber/formatter/profile.rb", "lib/cucumber/formatter/progress.rb", "lib/cucumber/formatter/rerun.rb", "lib/cucumber/formatter/unicode.rb", "lib/cucumber/formatter/usage.rb", "lib/cucumber/formatters/unicode.rb", "lib/cucumber/languages.yml", "lib/cucumber/parser.rb", "lib/cucumber/parser/feature.rb", "lib/cucumber/parser/feature.tt", "lib/cucumber/parser/i18n.tt", "lib/cucumber/parser/table.rb", "lib/cucumber/parser/table.tt", "lib/cucumber/parser/treetop_ext.rb", "lib/cucumber/platform.rb", "lib/cucumber/rails/rspec.rb", "lib/cucumber/rails/world.rb", "lib/cucumber/rake/task.rb", "lib/cucumber/step_definition.rb", "lib/cucumber/step_match.rb", "lib/cucumber/step_mother.rb", "lib/cucumber/version.rb", "lib/cucumber/world.rb", "rails_generators/cucumber/USAGE", "rails_generators/cucumber/cucumber_generator.rb", "rails_generators/cucumber/templates/cucumber", "rails_generators/cucumber/templates/cucumber.rake", "rails_generators/cucumber/templates/env.rb", "rails_generators/cucumber/templates/paths.rb", "rails_generators/cucumber/templates/webrat_steps.rb", "rails_generators/feature/USAGE", "rails_generators/feature/feature_generator.rb", "rails_generators/feature/templates/feature.erb", "rails_generators/feature/templates/steps.erb", "spec/cucumber/ast/background_spec.rb", "spec/cucumber/ast/feature_element_spec.rb", "spec/cucumber/ast/feature_factory.rb", "spec/cucumber/ast/feature_spec.rb", "spec/cucumber/ast/py_string_spec.rb", "spec/cucumber/ast/scenario_outline_spec.rb", "spec/cucumber/ast/scenario_spec.rb", "spec/cucumber/ast/step_collection_spec.rb", "spec/cucumber/ast/step_spec.rb", "spec/cucumber/ast/table_spec.rb", "spec/cucumber/ast/visitor_spec.rb", "spec/cucumber/broadcaster_spec.rb", "spec/cucumber/cli/configuration_spec.rb", "spec/cucumber/cli/main_spec.rb", "spec/cucumber/core_ext/proc_spec.rb", "spec/cucumber/core_ext/string_spec.rb", "spec/cucumber/formatter/ansicolor_spec.rb", "spec/cucumber/formatter/color_io_spec.rb", "spec/cucumber/formatter/html/cucumber.css", "spec/cucumber/formatter/html/cucumber.js", "spec/cucumber/formatter/html/index.html", "spec/cucumber/formatter/html/jquery-1.3.min.js", "spec/cucumber/formatter/html/jquery.uitableedit.js", "spec/cucumber/parser/feature_parser_spec.rb", "spec/cucumber/parser/table_parser_spec.rb", "spec/cucumber/rails/stubs/mini_rails.rb", "spec/cucumber/rails/stubs/test_help.rb", "spec/cucumber/rails/world_spec.rb", "spec/cucumber/sell_cucumbers.feature", "spec/cucumber/step_definition_spec.rb", "spec/cucumber/step_mother_spec.rb", "spec/cucumber/treetop_parser/empty_feature.feature", "spec/cucumber/treetop_parser/empty_scenario.feature", "spec/cucumber/treetop_parser/empty_scenario_outline.feature", "spec/cucumber/treetop_parser/fit_scenario.feature", "spec/cucumber/treetop_parser/given_scenario.feature", "spec/cucumber/treetop_parser/invalid_scenario_outlines.feature", "spec/cucumber/treetop_parser/multiline_steps.feature", "spec/cucumber/treetop_parser/multiple_tables.feature", "spec/cucumber/treetop_parser/scenario_outline.feature", "spec/cucumber/treetop_parser/spaces.feature", "spec/cucumber/treetop_parser/test_dos.feature", "spec/cucumber/treetop_parser/with_comments.feature", "spec/cucumber/treetop_parser/with_tags.feature", "spec/cucumber/world/pending_spec.rb", "spec/spec.opts", "spec/spec_helper.rb"] | |
+ s.files = ["History.txt", "License.txt", "Manifest.txt", "README.txt", "Rakefile", "bin/cucumber", "config/hoe.rb", "config/requirements.rb", "cucumber.gemspec", "cucumber.yml", "examples/cs/README.textile", "examples/cs/Rakefile", "examples/cs/compile.bat", "examples/cs/features/addition.feature", "examples/cs/features/step_definitons/calculator_steps.rb", "examples/cs/src/demo/Calculator.cs", "examples/dos_line_endings/Rakefile", "examples/dos_line_endings/features/dos_line_endings.feature", "examples/i18n/README.textile", "examples/i18n/Rakefile", "examples/i18n/ar/Rakefile", "examples/i18n/ar/features/addition.feature", "examples/i18n/ar/features/step_definitons/calculator_steps.rb", "examples/i18n/ar/lib/calculator.rb", "examples/i18n/bg/Rakefile", "examples/i18n/bg/features/addition.feature", "examples/i18n/bg/features/consecutive_calculations.feature", "examples/i18n/bg/features/division.feature", "examples/i18n/bg/features/step_definitons/calculator_steps.rb", "examples/i18n/bg/features/support/env.rb", "examples/i18n/bg/features/support/world.rb", "examples/i18n/bg/lib/calculator.rb", "examples/i18n/da/Rakefile", "examples/i18n/da/features/step_definitons/kalkulator_steps.rb", "examples/i18n/da/features/summering.feature", "examples/i18n/da/lib/kalkulator.rb", "examples/i18n/de/Rakefile", "examples/i18n/de/features/addition.feature", "examples/i18n/de/features/division.feature", "examples/i18n/de/features/step_definitons/calculator_steps.rb", "examples/i18n/de/lib/calculator.rb", "examples/i18n/en-lol/Rakefile", "examples/i18n/en-lol/features/step_definitions/cucumbrz_steps.rb", "examples/i18n/en-lol/features/stuffing.feature", "examples/i18n/en-lol/features/support/env.rb", "examples/i18n/en-lol/lib/basket.rb", "examples/i18n/en-lol/lib/belly.rb", "examples/i18n/en/Rakefile", "examples/i18n/en/features/addition.feature", "examples/i18n/en/features/division.feature", "examples/i18n/en/features/step_definitons/calculator_steps.rb", "examples/i18n/en/lib/calculator.rb", "examples/i18n/es/Rakefile", "examples/i18n/es/features/adicion.feature", "examples/i18n/es/features/step_definitons/calculador_steps.rb", "examples/i18n/es/lib/calculador.rb", "examples/i18n/et/Rakefile", "examples/i18n/et/features/jagamine.feature", "examples/i18n/et/features/liitmine.feature", "examples/i18n/et/features/step_definitions/kalkulaator_steps.rb", "examples/i18n/et/lib/kalkulaator.rb", "examples/i18n/fi/Rakefile", "examples/i18n/fi/features/jakolasku.feature", "examples/i18n/fi/features/step_definitons/laskin_steps.rb", "examples/i18n/fi/features/yhteenlasku.feature", "examples/i18n/fi/lib/laskin.rb", "examples/i18n/fr/Rakefile", "examples/i18n/fr/features/addition.feature", "examples/i18n/fr/features/step_definitions/calculatrice_steps.rb", "examples/i18n/fr/lib/calculatrice.rb", "examples/i18n/he/Rakefile", "examples/i18n/he/features/addition.feature", "examples/i18n/he/features/division.feature", "examples/i18n/he/features/step_definitons/calculator_steps.rb", "examples/i18n/he/lib/calculator.rb", "examples/i18n/hu/Rakefile", "examples/i18n/hu/features/addition.feature", "examples/i18n/hu/features/division.feature", "examples/i18n/hu/features/step_definitons/calculator_steps.rb", "examples/i18n/hu/lib/calculator.rb", "examples/i18n/id/Rakefile", "examples/i18n/id/features/addition.feature", "examples/i18n/id/features/division.feature", "examples/i18n/id/features/step_definitons/calculator_steps.rb", "examples/i18n/id/lib/calculator.rb", "examples/i18n/it/Rakefile", "examples/i18n/it/features/somma.feature", "examples/i18n/it/features/step_definitons/calcolatrice_steps.rb", "examples/i18n/it/lib/calcolatrice.rb", "examples/i18n/ja/Rakefile", "examples/i18n/ja/features/addition.feature", "examples/i18n/ja/features/division.feature", "examples/i18n/ja/features/step_definitons/calculator_steps.rb", "examples/i18n/ja/lib/calculator.rb", "examples/i18n/ko/Rakefile", "examples/i18n/ko/features/addition.feature", "examples/i18n/ko/features/division.feature", "examples/i18n/ko/features/step_definitons/calculator_steps.rb", "examples/i18n/ko/lib/calculator.rb", "examples/i18n/lt/Rakefile", "examples/i18n/lt/features/addition.feature", "examples/i18n/lt/features/division.feature", "examples/i18n/lt/features/step_definitons/calculator_steps.rb", "examples/i18n/lt/lib/calculator.rb", "examples/i18n/lv/Rakefile", "examples/i18n/lv/features/addition.feature", "examples/i18n/lv/features/division.feature", "examples/i18n/lv/features/step_definitons/calculator_steps.rb", "examples/i18n/lv/lib/calculator.rb", "examples/i18n/no/Rakefile", "examples/i18n/no/features/step_definitons/kalkulator_steps.rb", "examples/i18n/no/features/summering.feature", "examples/i18n/no/features/support/env.rb", "examples/i18n/no/lib/kalkulator.rb", "examples/i18n/pt/Rakefile", "examples/i18n/pt/features/adicao.feature", "examples/i18n/pt/features/step_definitions/calculadora_steps.rb", "examples/i18n/pt/lib/calculadora.rb", "examples/i18n/ro/Rakefile", "examples/i18n/ro/features/step_definitons/calculator_steps.rb", "examples/i18n/ro/features/suma.feature", "examples/i18n/ro/lib/calculator.rb", "examples/i18n/ru/Rakefile", "examples/i18n/ru/features/addition.feature", "examples/i18n/ru/features/consecutive_calculations.feature", "examples/i18n/ru/features/division.feature", "examples/i18n/ru/features/step_definitons/calculator_steps.rb", "examples/i18n/ru/features/support/env.rb", "examples/i18n/ru/features/support/world.rb", "examples/i18n/ru/lib/calculator.rb", "examples/i18n/se/Rakefile", "examples/i18n/se/features/step_definitons/kalkulator_steps.rb", "examples/i18n/se/features/summering.feature", "examples/i18n/se/lib/kalkulator.rb", "examples/i18n/sk/Rakefile", "examples/i18n/sk/features/addition.feature", "examples/i18n/sk/features/division.feature", "examples/i18n/sk/features/step_definitons/calculator_steps.rb", "examples/i18n/sk/lib/calculator.rb", "examples/i18n/zh-CN/Rakefile", "examples/i18n/zh-CN/features/addition.feature", "examples/i18n/zh-CN/features/step_definitons/calculator_steps.rb", "examples/i18n/zh-CN/lib/calculator.rb", "examples/i18n/zh-TW/Rakefile", "examples/i18n/zh-TW/features/addition.feature", "examples/i18n/zh-TW/features/division.feature", "examples/i18n/zh-TW/features/step_definitons/calculator_steps.rb", "examples/i18n/zh-TW/lib/calculator.rb", "examples/java/README.textile", "examples/java/Rakefile", "examples/java/features/hello.feature", "examples/java/features/step_definitons/hello_steps.rb", "examples/java/features/step_definitons/tree_steps.rb", "examples/java/features/tree.feature", "examples/java/src/cucumber/demo/Hello.java", "examples/pure_java/README.textile", "examples/selenium/Rakefile", "examples/selenium/features/search.feature", "examples/selenium/features/step_definitons/search_steps.rb", "examples/selenium/features/support/env.rb", "examples/selenium_webrat/Rakefile", "examples/selenium_webrat/features/search.feature", "examples/selenium_webrat/features/step_definitons/search_steps.rb", "examples/selenium_webrat/features/support/env.rb", "examples/self_test/README.textile", "examples/self_test/Rakefile", "examples/self_test/features/background/background_with_name.feature", "examples/self_test/features/background/failing_background.feature", "examples/self_test/features/background/failing_background_after_success.feature", "examples/self_test/features/background/missing_background.feature", "examples/self_test/features/background/multiline_args_background.feature", "examples/self_test/features/background/passing_background.feature", "examples/self_test/features/background/scenario_outline_failing_background.feature", "examples/self_test/features/background/scenario_outline_passing_background.feature", "examples/self_test/features/call_undefined_step_from_step_def.feature", "examples/self_test/features/failing_expectation.feature", "examples/self_test/features/lots_of_undefined.feature", "examples/self_test/features/multiline_name.feature", "examples/self_test/features/must_not_pass/failing.feature", "examples/self_test/features/must_not_pass/outline.feature", "examples/self_test/features/must_not_pass/passing.feature", "examples/self_test/features/must_not_pass/pending.feature", "examples/self_test/features/must_not_pass/unimplemented.feature", "examples/self_test/features/outline_sample.feature", "examples/self_test/features/sample.feature", "examples/self_test/features/search_sample.feature", "examples/self_test/features/step_definitions/sample_steps.rb", "examples/self_test/features/support/env.rb", "examples/self_test/features/support/tag_count_formatter.rb", "examples/self_test/features/tons_of_cukes.feature", "examples/self_test/features/undefined_multiline_args.feature", "examples/sinatra/Rakefile", "examples/sinatra/app.rb", "examples/sinatra/features/add.feature", "examples/sinatra/features/step_definitions/add_steps.rb", "examples/sinatra/features/support/env.rb", "examples/sinatra/views/add.erb", "examples/sinatra/views/layout.erb", "examples/test_unit/Rakefile", "examples/test_unit/features/step_definitions/test_unit_steps.rb", "examples/test_unit/features/test_unit.feature", "examples/tickets/Rakefile", "examples/tickets/features/172.feature", "examples/tickets/features/177/1.feature", "examples/tickets/features/177/2.feature", "examples/tickets/features/177/3.feature", "examples/tickets/features/180.feature", "examples/tickets/features/229/tagged_hooks.feature", "examples/tickets/features/229/tagged_hooks.rb", "examples/tickets/features/236.feature", "examples/tickets/features/241.feature", "examples/tickets/features/246.feature", "examples/tickets/features/248.feature", "examples/tickets/features/270/back.feature", "examples/tickets/features/270/back.steps.rb", "examples/tickets/features/272/hooks.feature", "examples/tickets/features/272/hooks_steps.rb", "examples/tickets/features/279/py_string_indent.feature", "examples/tickets/features/279/py_string_indent.steps.rb", "examples/tickets/features/279/wrong.feature_", "examples/tickets/features/301/filter_background_tagged_hooks.feature", "examples/tickets/features/301/filter_background_tagged_hooks_steps.rb", "examples/tickets/features/306/only_background.feature", "examples/tickets/features/lib/eatting_machine.rb", "examples/tickets/features/lib/pantry.rb", "examples/tickets/features/scenario_outline.feature", "examples/tickets/features/step_definitons/246_steps.rb", "examples/tickets/features/step_definitons/248_steps.rb", "examples/tickets/features/step_definitons/scenario_outline_steps.rb", "examples/tickets/features/step_definitons/tickets_steps.rb", "examples/tickets/features/tickets.feature", "examples/watir/README.textile", "examples/watir/Rakefile", "examples/watir/features/search.feature", "examples/watir/features/step_definitons/search_steps.rb", "examples/watir/features/support/env.rb", "features/background.feature", "features/cucumber_cli.feature", "features/cucumber_cli_diff_disabled.feature", "features/cucumber_cli_outlines.feature", "features/custom_formatter.feature", "features/in_progress_rake_task.feature", "features/multiline_names.feature", "features/must_not_pass.feature", "features/rake_task.feature", "features/regression_rake_task.feature", "features/report_called_undefined_steps.feature", "features/snippet.feature", "features/step_definitions/cucumber_steps.rb", "features/step_definitions/extra_steps.rb", "features/support/env.rb", "features/usage.feature", "gem_tasks/deployment.rake", "gem_tasks/environment.rake", "gem_tasks/features.rake", "gem_tasks/fix_cr_lf.rake", "gem_tasks/flog.rake", "gem_tasks/gemspec.rake", "gem_tasks/rspec.rake", "gem_tasks/yard.rake", "lib/autotest/cucumber.rb", "lib/autotest/cucumber_mixin.rb", "lib/autotest/cucumber_rails.rb", "lib/autotest/cucumber_rails_rspec.rb", "lib/autotest/cucumber_rspec.rb", "lib/autotest/discover.rb", "lib/cucumber.rb", "lib/cucumber/ast.rb", "lib/cucumber/ast/background.rb", "lib/cucumber/ast/comment.rb", "lib/cucumber/ast/examples.rb", "lib/cucumber/ast/feature.rb", "lib/cucumber/ast/feature_element.rb", "lib/cucumber/ast/features.rb", "lib/cucumber/ast/outline_table.rb", "lib/cucumber/ast/py_string.rb", "lib/cucumber/ast/scenario.rb", "lib/cucumber/ast/scenario_outline.rb", "lib/cucumber/ast/step.rb", "lib/cucumber/ast/step_collection.rb", "lib/cucumber/ast/step_invocation.rb", "lib/cucumber/ast/table.rb", "lib/cucumber/ast/tags.rb", "lib/cucumber/ast/visitor.rb", "lib/cucumber/broadcaster.rb", "lib/cucumber/cli/configuration.rb", "lib/cucumber/cli/language_help_formatter.rb", "lib/cucumber/cli/main.rb", "lib/cucumber/core_ext/exception.rb", "lib/cucumber/core_ext/instance_exec.rb", "lib/cucumber/core_ext/proc.rb", "lib/cucumber/core_ext/string.rb", "lib/cucumber/formatter.rb", "lib/cucumber/formatter/ansicolor.rb", "lib/cucumber/formatter/color_io.rb", "lib/cucumber/formatter/console.rb", "lib/cucumber/formatter/cucumber.css", "lib/cucumber/formatter/cucumber.sass", "lib/cucumber/formatter/html.rb", "lib/cucumber/formatter/pretty.rb", "lib/cucumber/formatter/profile.rb", "lib/cucumber/formatter/progress.rb", "lib/cucumber/formatter/rerun.rb", "lib/cucumber/formatter/unicode.rb", "lib/cucumber/formatter/usage.rb", "lib/cucumber/formatters/unicode.rb", "lib/cucumber/languages.yml", "lib/cucumber/parser.rb", "lib/cucumber/parser/feature.rb", "lib/cucumber/parser/feature.tt", "lib/cucumber/parser/i18n.tt", "lib/cucumber/parser/table.rb", "lib/cucumber/parser/table.tt", "lib/cucumber/parser/treetop_ext.rb", "lib/cucumber/platform.rb", "lib/cucumber/rails/rspec.rb", "lib/cucumber/rails/world.rb", "lib/cucumber/rake/task.rb", "lib/cucumber/step_definition.rb", "lib/cucumber/step_match.rb", "lib/cucumber/step_mother.rb", "lib/cucumber/version.rb", "lib/cucumber/world.rb", "logos/gideon-bullock-1.png", "logos/gideon-bullock-2.png", "rails_generators/cucumber/USAGE", "rails_generators/cucumber/cucumber_generator.rb", "rails_generators/cucumber/templates/cucumber", "rails_generators/cucumber/templates/cucumber.rake", "rails_generators/cucumber/templates/env.rb", "rails_generators/cucumber/templates/paths.rb", "rails_generators/cucumber/templates/webrat_steps.rb", "rails_generators/feature/USAGE", "rails_generators/feature/feature_generator.rb", "rails_generators/feature/templates/feature.erb", "rails_generators/feature/templates/steps.erb", "spec/cucumber/ast/background_spec.rb", "spec/cucumber/ast/example_cells_spec.rb", "spec/cucumber/ast/feature_element_spec.rb", "spec/cucumber/ast/feature_factory.rb", "spec/cucumber/ast/feature_spec.rb", "spec/cucumber/ast/py_string_spec.rb", "spec/cucumber/ast/scenario_outline_spec.rb", "spec/cucumber/ast/scenario_spec.rb", "spec/cucumber/ast/step_collection_spec.rb", "spec/cucumber/ast/step_spec.rb", "spec/cucumber/ast/table_spec.rb", "spec/cucumber/ast/visitor_spec.rb", "spec/cucumber/broadcaster_spec.rb", "spec/cucumber/cli/configuration_spec.rb", "spec/cucumber/cli/main_spec.rb", "spec/cucumber/core_ext/proc_spec.rb", "spec/cucumber/core_ext/string_spec.rb", "spec/cucumber/formatter/ansicolor_spec.rb", "spec/cucumber/formatter/color_io_spec.rb", "spec/cucumber/formatter/html/cucumber.css", "spec/cucumber/formatter/html/cucumber.js", "spec/cucumber/formatter/html/index.html", "spec/cucumber/formatter/html/jquery-1.3.min.js", "spec/cucumber/formatter/html/jquery.uitableedit.js", "spec/cucumber/parser/feature_parser_spec.rb", "spec/cucumber/parser/table_parser_spec.rb", "spec/cucumber/rails/stubs/mini_rails.rb", "spec/cucumber/rails/stubs/test_help.rb", "spec/cucumber/rails/world_spec.rb", "spec/cucumber/sell_cucumbers.feature", "spec/cucumber/step_definition_spec.rb", "spec/cucumber/step_mother_spec.rb", "spec/cucumber/treetop_parser/empty_feature.feature", "spec/cucumber/treetop_parser/empty_scenario.feature", "spec/cucumber/treetop_parser/empty_scenario_outline.feature", "spec/cucumber/treetop_parser/fit_scenario.feature", "spec/cucumber/treetop_parser/given_scenario.feature", "spec/cucumber/treetop_parser/invalid_scenario_outlines.feature", "spec/cucumber/treetop_parser/multiline_steps.feature", "spec/cucumber/treetop_parser/multiple_tables.feature", "spec/cucumber/treetop_parser/scenario_outline.feature", "spec/cucumber/treetop_parser/spaces.feature", "spec/cucumber/treetop_parser/test_dos.feature", "spec/cucumber/treetop_parser/with_comments.feature", "spec/cucumber/treetop_parser/with_tags.feature", "spec/cucumber/world/pending_spec.rb", "spec/spec.opts", "spec/spec_helper.rb"] | |
s.has_rdoc = true | |
s.homepage = %q{http://cukes.info} | |
s.rdoc_options = ["--main", "README.txt"] | |
diff --git a/examples/self_test/features/background/missing_background.feature b/examples/self_test/features/background/missing_background.feature | |
new file mode 100644 | |
index 0000000..4cef6a6 | |
--- /dev/null | |
+++ b/examples/self_test/features/background/missing_background.feature | |
@@ -0,0 +1,10 @@ | |
+Feature: Pending background sample | |
+ | |
+ Background: | |
+ Given missing | |
+ | |
+ Scenario: missing background | |
+ Then I should have '10' cukes | |
+ | |
+ Scenario: another missing background | |
+ Then I should have '10' cukes | |
\ No newline at end of file | |
diff --git a/examples/self_test/features/background/pending_background.feature b/examples/self_test/features/background/pending_background.feature | |
deleted file mode 100644 | |
index 8ad9c74..0000000 | |
--- a/examples/self_test/features/background/pending_background.feature | |
+++ /dev/null | |
@@ -1,10 +0,0 @@ | |
-Feature: Pending background sample | |
- | |
- Background: | |
- Given pending | |
- | |
- Scenario: pending background | |
- Then I should have '10' cukes | |
- | |
- Scenario: another pending background | |
- Then I should have '10' cukes | |
\ No newline at end of file | |
diff --git a/examples/self_test/features/must_not_pass/failing.feature b/examples/self_test/features/must_not_pass/failing.feature | |
new file mode 100644 | |
index 0000000..10aeac7 | |
--- /dev/null | |
+++ b/examples/self_test/features/must_not_pass/failing.feature | |
@@ -0,0 +1,7 @@ | |
+Feature: Failing | |
+ | |
+ Scenario: Failing | |
+ Given failing | |
+ """ | |
+ hello | |
+ """ | |
\ No newline at end of file | |
diff --git a/examples/self_test/features/must_not_pass/outline.feature b/examples/self_test/features/must_not_pass/outline.feature | |
new file mode 100644 | |
index 0000000..2b42d4f | |
--- /dev/null | |
+++ b/examples/self_test/features/must_not_pass/outline.feature | |
@@ -0,0 +1,8 @@ | |
+Feature: Outline | |
+ | |
+ Scenario Outline: Outline | |
+ Given an scenario outline example that <result> | |
+ Examples: | |
+ | result | | |
+ | fails | | |
+ | passes | | |
\ No newline at end of file | |
diff --git a/examples/self_test/features/must_not_pass/passing.feature b/examples/self_test/features/must_not_pass/passing.feature | |
new file mode 100644 | |
index 0000000..36c3ffc | |
--- /dev/null | |
+++ b/examples/self_test/features/must_not_pass/passing.feature | |
@@ -0,0 +1,6 @@ | |
+Feature: Passing | |
+ | |
+ Scenario: Passing | |
+ Given passing | |
+ |a|b| | |
+ |c|d| | |
diff --git a/examples/self_test/features/must_not_pass/pending.feature b/examples/self_test/features/must_not_pass/pending.feature | |
new file mode 100644 | |
index 0000000..ad8f73a | |
--- /dev/null | |
+++ b/examples/self_test/features/must_not_pass/pending.feature | |
@@ -0,0 +1,4 @@ | |
+Feature: Pending | |
+ | |
+ Scenario: Pending | |
+ Given pending | |
diff --git a/examples/self_test/features/must_not_pass/unimplemented.feature b/examples/self_test/features/must_not_pass/unimplemented.feature | |
new file mode 100644 | |
index 0000000..ad0f450 | |
--- /dev/null | |
+++ b/examples/self_test/features/must_not_pass/unimplemented.feature | |
@@ -0,0 +1,5 @@ | |
+Feature: Missing | |
+ | |
+ Scenario: Missing | |
+ Given missing | |
+ | |
diff --git a/examples/self_test/features/step_definitions/sample_steps.rb b/examples/self_test/features/step_definitions/sample_steps.rb | |
index 625ef93..9989446 100644 | |
--- a/examples/self_test/features/step_definitions/sample_steps.rb | |
+++ b/examples/self_test/features/step_definitions/sample_steps.rb | |
@@ -79,3 +79,12 @@ After('@after_file') do | |
FileUtils.mkdir_p(File.dirname(after_file)) | |
FileUtils.touch(after_file) | |
end | |
+ | |
+Given /^pending$/ do | |
+ pending "foo" | |
+end | |
+ | |
+Given /^an scenario outline example that (.*)$/ do |result| | |
+ flunker if result == "fails" | |
+end | |
+ | |
diff --git a/features/background.feature b/features/background.feature | |
index 35b6bec..757e763 100644 | |
--- a/features/background.feature | |
+++ b/features/background.feature | |
@@ -80,7 +80,7 @@ Feature: backgrounds | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/background/failing_background.feature:5:in `Given failing without a table' | |
+ features/background/failing_background.feature:5:in `Background: : Given failing without a table' | |
And '10' cukes | |
Scenario: failing background | |
@@ -106,7 +106,7 @@ Feature: backgrounds | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/background/scenario_outline_failing_background.feature:4:in `Given failing without a table' | |
+ features/background/scenario_outline_failing_background.feature:4:in `Background: : Given failing without a table' | |
Scenario Outline: failing background | |
Then I should have '<count>' cukes | |
@@ -127,19 +127,19 @@ Feature: backgrounds | |
""" | |
- Scenario: run a feature with a background that is pending | |
- When I run cucumber -q features/background/pending_background.feature --require features | |
+ Scenario: run a feature with a background that is unimplemented | |
+ When I run cucumber -q features/background/missing_background.feature --require features | |
Then it should pass with | |
""" | |
Feature: Pending background sample | |
Background: | |
- Given pending | |
+ Given missing | |
- Scenario: pending background | |
+ Scenario: missing background | |
Then I should have '10' cukes | |
- Scenario: another pending background | |
+ Scenario: another missing background | |
Then I should have '10' cukes | |
2 scenarios (2 undefined) | |
@@ -165,7 +165,7 @@ Feature: backgrounds | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:37:in `/^'(.+)' global cukes$/' | |
- features/background/failing_background_after_success.feature:5:in `And '10' global cukes' | |
+ features/background/failing_background_after_success.feature:5:in `Background: : And '10' global cukes' | |
Then I should have '10' global cukes | |
2 scenarios (1 failed, 1 passed) | |
diff --git a/features/cucumber_cli.feature b/features/cucumber_cli.feature | |
index 9d5f3ce..9da2770 100644 | |
--- a/features/cucumber_cli.feature | |
+++ b/features/cucumber_cli.feature | |
@@ -29,7 +29,7 @@ Feature: Cucumber command line | |
Scenario: Missing | |
Given missing | |
Undefined step: "missing" (Cucumber::Undefined) | |
- features/sample.feature:6:in `Given missing' | |
+ features/sample.feature:6:in `Scenario: Missing : Given missing' | |
1 scenario (1 undefined) | |
1 step (1 undefined) | |
@@ -74,7 +74,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:9:in `/^failing$/' | |
- features/sample.feature:16:in `Given failing' | |
+ features/sample.feature:16:in `Scenario: Failing : Given failing' | |
2 scenarios (1 failed, 1 undefined) | |
2 steps (1 failed, 1 undefined) | |
@@ -126,7 +126,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:9:in `/^failing$/' | |
- features/sample.feature:16:in `Given failing' | |
+ features/sample.feature:16:in `Scenario: Failing : Given failing' | |
3 scenarios (1 failed, 1 undefined, 1 passed) | |
3 steps (1 failed, 1 undefined, 1 passed) | |
@@ -430,7 +430,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:9:in `/^failing$/' | |
- features/sample.feature:16:in `Given failing' | |
+ features/sample.feature:16:in `Scenario: Failing : Given failing' | |
3 scenarios (1 failed, 1 undefined, 1 passed) | |
3 steps (1 failed, 1 undefined, 1 passed) | |
diff --git a/features/cucumber_cli_diff_disabled.feature b/features/cucumber_cli_diff_disabled.feature | |
index 7cebe92..c695152 100644 | |
--- a/features/cucumber_cli_diff_disabled.feature | |
+++ b/features/cucumber_cli_diff_disabled.feature | |
@@ -18,7 +18,7 @@ Feature: Cucumber command line | |
+this | |
(Spec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/sample_steps.rb:63:in `/^failing expectation$/' | |
- features/failing_expectation.feature:4:in `Given failing expectation' | |
+ features/failing_expectation.feature:4:in `Scenario: Failing expectation : Given failing expectation' | |
1 scenario (1 failed) | |
1 step (1 failed) | |
@@ -36,7 +36,7 @@ Feature: Cucumber command line | |
expected: "that", | |
got: "this" (using ==) (Spec::Expectations::ExpectationNotMetError) | |
./features/step_definitions/sample_steps.rb:63:in `/^failing expectation$/' | |
- features/failing_expectation.feature:4:in `Given failing expectation' | |
+ features/failing_expectation.feature:4:in `Scenario: Failing expectation : Given failing expectation' | |
1 scenario (1 failed) | |
1 step (1 failed) | |
diff --git a/features/cucumber_cli_outlines.feature b/features/cucumber_cli_outlines.feature | |
index 0db5bfa..4f73e49 100644 | |
--- a/features/cucumber_cli_outlines.feature | |
+++ b/features/cucumber_cli_outlines.feature | |
@@ -20,7 +20,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/outline_sample.feature:6:in `Given <state> without a table' | |
+ features/outline_sample.feature:6:in `Scenario Outline: Test state : Given <state> without a table' | |
Examples: Only passing | |
| state | other_state | | |
@@ -49,7 +49,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/outline_sample.feature:6:in `Given <state> without a table' | |
+ features/outline_sample.feature:6:in `Scenario Outline: Test state : Given <state> without a table' | |
Examples: Only passing | |
| state | other_state | | |
@@ -76,7 +76,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/outline_sample.feature:6:in `Given <state> without a table' | |
+ features/outline_sample.feature:6:in `Scenario Outline: Test state : Given <state> without a table' | |
1 scenario (1 failed) | |
2 steps (1 failed, 1 skipped) | |
@@ -97,7 +97,7 @@ Feature: Cucumber command line | |
FAIL (RuntimeError) | |
./features/step_definitions/sample_steps.rb:2:in `flunker' | |
./features/step_definitions/sample_steps.rb:16:in `/^failing without a table$/' | |
- features/outline_sample.feature:6:in `Given <state> without a table' | |
+ features/outline_sample.feature:6:in `Scenario Outline: Test state : Given <state> without a table' | |
5 scenarios (1 failed, 1 undefined, 3 passed) | |
8 steps (1 failed, 2 skipped, 1 undefined, 4 passed) | |
diff --git a/features/in_progress_rake_task.feature b/features/in_progress_rake_task.feature | |
new file mode 100644 | |
index 0000000..e2ade74 | |
--- /dev/null | |
+++ b/features/in_progress_rake_task.feature | |
@@ -0,0 +1,93 @@ | |
+Feature: In Progress Rake task | |
+ In order to easily see the status of features that are in progress | |
+ As a developer and CI server administrator | |
+ I want a convenient rake task to run all the currently in progress features | |
+ | |
+ Background: | |
+ Given a standard Cucumber project directory structure | |
+ And a file named "features/step_definitions/steps.rb" with: | |
+ """ | |
+ def flunker | |
+ raise "FAIL" | |
+ end | |
+ | |
+ Given /^passing$/ do | |
+ end | |
+ | |
+ Given /^failing$/ do | |
+ flunker | |
+ end | |
+ | |
+ Given /^pending$/ do | |
+ pending "foo" | |
+ end | |
+ | |
+ """ | |
+ And a file named "Rakefile" with: | |
+ """ | |
+ $LOAD_PATH.unshift(CUCUMBER_LIB) | |
+ require 'cucumber/rake/task' | |
+ | |
+ Cucumber::Rake::InProgressTask.new() | |
+ | |
+ """ | |
+ | |
+ | |
+ Scenario: should fail if any scenarios pass (as that means they should be in regression) | |
+ Given a file named "features/passing_in_progress.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ @in_progress | |
+ Scenario: passing | |
+ Given passing | |
+ """ | |
+ When I run rake in_progress | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 passed) | |
+ 1 step (1 passed) | |
+ """ | |
+ | |
+ Scenario: should pass if there are failing or undefined scenarios | |
+ Given a file named "features/failing_in_progress.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ @in_progress | |
+ Scenario: failing | |
+ Given failing | |
+ | |
+ @in_progress | |
+ Scenario: missing | |
+ Given missing | |
+ """ | |
+ When I run rake in_progress | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 2 scenarios (1 failed, 1 undefined) | |
+ 2 steps (1 failed, 1 undefined) | |
+ """ | |
+ | |
+ | |
+ Scenario: regression suite should not run scenarios unless marked as still in progress | |
+ Given a file named "features/undefined_regression.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ Scenario: passing | |
+ Given passing | |
+ | |
+ @in_progress | |
+ Scenario: failing | |
+ Given failing | |
+ """ | |
+ When I run rake in_progress | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 failed) | |
+ 1 step (1 failed) | |
+ """ | |
diff --git a/features/must_not_pass.feature b/features/must_not_pass.feature | |
new file mode 100644 | |
index 0000000..3a1a9ef | |
--- /dev/null | |
+++ b/features/must_not_pass.feature | |
@@ -0,0 +1,78 @@ | |
+Feature: Cucumber --must_not_pass switch | |
+ In order to ensure that feature scenarios do not pass until they are expected to | |
+ Developers should be able to run cucumber in a mode that | |
+ - will fail if any scenario passes completely | |
+ - will not fail otherwise | |
+ | |
+ | |
+ Scenario: Allow Failing Scenarios | |
+ When I run cucumber -q features/must_not_pass/failing.feature --must-not-pass --require features | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 failed) | |
+ 1 step (1 failed) | |
+ """ | |
+ Scenario: Allow Unimplemented Scenarios | |
+ When I run cucumber -q features/must_not_pass/unimplemented.feature --must-not-pass --require features | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 undefined) | |
+ 1 step (1 undefined) | |
+ """ | |
+ | |
+ Scenario: Allow Pending Scenarios | |
+ When I run cucumber -q features/must_not_pass/pending.feature --must-not-pass --require features | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 pending) | |
+ 1 step (1 pending) | |
+ """ | |
+ | |
+ Scenario: Do not allow Passing Scenarios | |
+ When I run cucumber -q features/must_not_pass/passing.feature --must-not-pass --require features | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 passed) | |
+ 1 step (1 passed) | |
+ | |
+ Some scenarios passed, but the --must-not-pass switch was used | |
+ (::) passed scenarios (::) | |
+ | |
+ features/must_not_pass/passing.feature:3:in `Scenario: Passing' | |
+ """ | |
+ | |
+ | |
+ Scenario: should work with a scenario outline | |
+ When I run cucumber -q features/must_not_pass/outline.feature --must-not-pass --require features | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 2 scenarios (1 failed, 1 passed) | |
+ 2 steps (1 failed, 1 passed) | |
+ | |
+ Some scenarios passed, but the --must-not-pass switch was used | |
+ (::) passed scenarios (::) | |
+ | |
+ features/must_not_pass/outline.feature:8:in `Scenario Outline: Outline : |passes|' | |
+ """ | |
+ | |
+ Scenario: any passing scenarios fail entire run | |
+ When I run cucumber -q features/must_not_pass --must-not-pass --require features | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 6 scenarios (2 failed, 1 undefined, 1 pending, 2 passed) | |
+ 6 steps (2 failed, 1 undefined, 1 pending, 2 passed) | |
+ | |
+ Some scenarios passed, but the --must-not-pass switch was used | |
+ (::) passed scenarios (::) | |
+ | |
+ features/must_not_pass/outline.feature:8:in `Scenario Outline: Outline : |passes|' | |
+ | |
+ features/must_not_pass/passing.feature:3:in `Scenario: Passing' | |
+ """ | |
+ | |
diff --git a/features/regression_rake_task.feature b/features/regression_rake_task.feature | |
new file mode 100644 | |
index 0000000..81363c8 | |
--- /dev/null | |
+++ b/features/regression_rake_task.feature | |
@@ -0,0 +1,107 @@ | |
+Feature: Regression Rake task | |
+ In order to easily distinguish between completed features and in progress work | |
+ As a developer and CI server administrator | |
+ I want a convenient rake task to run a regression suite | |
+ | |
+ Background: | |
+ Given a standard Cucumber project directory structure | |
+ And a file named "features/step_definitions/steps.rb" with: | |
+ """ | |
+ def flunker | |
+ raise "FAIL" | |
+ end | |
+ | |
+ Given /^passing$/ do | |
+ end | |
+ | |
+ Given /^failing$/ do | |
+ flunker | |
+ end | |
+ | |
+ Given /^pending$/ do | |
+ pending "foo" | |
+ end | |
+ | |
+ """ | |
+ And a file named "Rakefile" with: | |
+ """ | |
+ $LOAD_PATH.unshift(CUCUMBER_LIB) | |
+ require 'cucumber/rake/task' | |
+ | |
+ Cucumber::Rake::RegressionTask.new() | |
+ | |
+ """ | |
+ | |
+ | |
+ | |
+ Scenario: should pass if all steps pass or are explicitly pending | |
+ Given a file named "features/passing_regression.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ Scenario: passing | |
+ Given passing | |
+ | |
+ Scenario: pending | |
+ Given pending | |
+ """ | |
+ When I run rake regression | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 2 scenarios (1 pending, 1 passed) | |
+ 2 steps (1 pending, 1 passed) | |
+ """ | |
+ | |
+ Scenario: should not pass if there are failures | |
+ Given a file named "features/failing_regression.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ Scenario: failing | |
+ Given failing | |
+ """ | |
+ When I run rake regression | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 failed) | |
+ 1 step (1 failed) | |
+ """ | |
+ | |
+ Scenario: regression suite should break when step refactoring acidentally causes steps to become undefined again | |
+ Given a file named "features/undefined_regression.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ Scenario: missing | |
+ Given missing | |
+ """ | |
+ When I run rake regression | |
+ Then it should fail | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 undefined) | |
+ 1 step (1 undefined) | |
+ """ | |
+ | |
+ Scenario: regression suite should not run scenarios marked as still in progress | |
+ Given a file named "features/undefined_regression.feature" with: | |
+ """ | |
+ Feature: Sample | |
+ | |
+ Scenario: passing | |
+ Given passing | |
+ | |
+ @in_progress | |
+ Scenario: failing | |
+ Given failing | |
+ """ | |
+ When I run rake regression | |
+ Then it should pass | |
+ And the output should contain | |
+ """ | |
+ 1 scenario (1 passed) | |
+ 1 step (1 passed) | |
+ """ | |
+ | |
\ No newline at end of file | |
diff --git a/features/report_called_undefined_steps.feature b/features/report_called_undefined_steps.feature | |
index 928d712..c78ff8f 100644 | |
--- a/features/report_called_undefined_steps.feature | |
+++ b/features/report_called_undefined_steps.feature | |
@@ -12,13 +12,13 @@ Feature: Cucumber command line | |
Given a step definition that calls an undefined step # features/step_definitions/sample_steps.rb:19 | |
Undefined step: "this does not exist" (Cucumber::Undefined) | |
./features/step_definitions/sample_steps.rb:20:in `/^a step definition that calls an undefined step$/' | |
- features/call_undefined_step_from_step_def.feature:4:in `Given a step definition that calls an undefined step' | |
+ features/call_undefined_step_from_step_def.feature:4:in `Scenario: Call directly : Given a step definition that calls an undefined step' | |
Scenario: Call via another # features/call_undefined_step_from_step_def.feature:6 | |
Given call step "a step definition that calls an undefined step" # features/step_definitions/sample_steps.rb:23 | |
Undefined step: "this does not exist" (Cucumber::Undefined) | |
./features/step_definitions/sample_steps.rb:20:in `/^a step definition that calls an undefined step$/' | |
- features/call_undefined_step_from_step_def.feature:7:in `Given call step "a step definition that calls an undefined step"' | |
+ features/call_undefined_step_from_step_def.feature:7:in `Scenario: Call via another : Given call step "a step definition that calls an undefined step"' | |
2 scenarios (2 undefined) | |
2 steps (2 undefined) | |
diff --git a/features/usage.feature b/features/usage.feature | |
index c51c916..b46c3de 100644 | |
--- a/features/usage.feature | |
+++ b/features/usage.feature | |
@@ -86,10 +86,10 @@ Feature: Cucumber command line | |
Then I should have '10' cukes # features/background/background_with_name.feature:7 | |
Then I should have '10' cukes # features/background/failing_background.feature:9 | |
Then I should have '10' cukes # features/background/failing_background.feature:12 | |
+ Then I should have '10' cukes # features/background/missing_background.feature:7 | |
+ Then I should have '10' cukes # features/background/missing_background.feature:10 | |
Then I should have '10' cukes # features/background/passing_background.feature:7 | |
Then I should have '10' cukes # features/background/passing_background.feature:10 | |
- Then I should have '10' cukes # features/background/pending_background.feature:7 | |
- Then I should have '10' cukes # features/background/pending_background.feature:10 | |
Then I should have '<count>' cukes # features/background/scenario_outline_failing_background.feature:7 | |
Then I should have '<count>' cukes # features/background/scenario_outline_failing_background.feature:13 | |
Then I should have '<count>' cukes # features/background/scenario_outline_passing_background.feature:7 | |
@@ -110,10 +110,16 @@ Feature: Cucumber command line | |
Then the multiline string should be # features/background/multiline_args_background.feature:17 | |
Then the multiline string should be # features/background/multiline_args_background.feature:27 | |
/^passing$/ # features/step_definitions/sample_steps.rb:5 | |
+ Given passing # features/must_not_pass/passing.feature:4 | |
Given passing # features/sample.feature:10 | |
/^failing expectation$/ # features/step_definitions/sample_steps.rb:62 | |
Given failing expectation # features/failing_expectation.feature:4 | |
+ /^pending$/ # features/step_definitions/sample_steps.rb:83 | |
+ Given pending # features/must_not_pass/pending.feature:4 | |
+ /^an scenario outline example that (.*)$/ # features/step_definitions/sample_steps.rb:87 | |
+ Given an scenario outline example that <result> # features/must_not_pass/outline.feature:4 | |
/^failing$/ # features/step_definitions/sample_steps.rb:8 | |
+ Given failing # features/must_not_pass/failing.feature:4 | |
Given failing # features/sample.feature:16 | |
(::) UNUSED (::) | |
/^unused$/ # features/step_definitions/sample_steps.rb:66 | |
diff --git a/lib/cucumber/ast/feature_element.rb b/lib/cucumber/ast/feature_element.rb | |
index 40cfaf4..19ea758 100644 | |
--- a/lib/cucumber/ast/feature_element.rb | |
+++ b/lib/cucumber/ast/feature_element.rb | |
@@ -24,7 +24,7 @@ module Cucumber | |
if @name.empty? | |
[@keyword.jlength] | |
else | |
- @name.split("\n").enum_for(:each_with_index).map do |line, line_number| | |
+ @name.split("\n").enum_for(:each_with_index).map do |line, line_number| | |
line_number == 0 ? @keyword.jlength + line.jlength : line.jlength + Ast::Step::INDENT - 1 # We -1 as names which are not keyword lines are missing a space between keyword and name | |
end | |
end | |
@@ -32,10 +32,12 @@ module Cucumber | |
def matches_scenario_names?(scenario_name_regexps) | |
scenario_name_regexps.detect{|name| name =~ @name} | |
- end | |
+ end | |
- def backtrace_line(name = "#{@keyword} #{@name}", line = @line) | |
- @feature.backtrace_line(name, line) if @feature | |
+ def backtrace_line(name = "", line = @line) | |
+ full_name = "#{@keyword} #{@name}" | |
+ full_name += " : #{name}" unless name.empty? | |
+ @feature.backtrace_line(full_name, line) if @feature | |
end | |
def source_indent(text_length) | |
diff --git a/lib/cucumber/ast/outline_table.rb b/lib/cucumber/ast/outline_table.rb | |
index c156cbe..d2096da 100644 | |
--- a/lib/cucumber/ast/outline_table.rb | |
+++ b/lib/cucumber/ast/outline_table.rb | |
@@ -30,16 +30,17 @@ module Cucumber | |
cells.create_step_invocations!(scenario_outline) | |
end | |
end | |
- | |
+ | |
def example_rows | |
cells_rows[1..-1] | |
end | |
class ExampleCells < Cells | |
def create_step_invocations!(scenario_outline) | |
+ @scenario_outline = scenario_outline | |
@step_invocations = scenario_outline.step_invocations(self) | |
end | |
- | |
+ | |
def skip_invoke! | |
@step_invocations.each do |step_invocation| | |
step_invocation.skip_invoke! | |
@@ -85,6 +86,13 @@ module Cucumber | |
@step_invocations.status | |
end | |
+ def backtrace_line | |
+ name = "|" | |
+ name += @cells.collect{|c| c.value }.join("|") | |
+ name += "|" | |
+ @scenario_outline.backtrace_line(name,@cells.first.line) | |
+ end | |
+ | |
private | |
def header? | |
diff --git a/lib/cucumber/cli/configuration.rb b/lib/cucumber/cli/configuration.rb | |
index 3da9489..d01e2f0 100644 | |
--- a/lib/cucumber/cli/configuration.rb | |
+++ b/lib/cucumber/cli/configuration.rb | |
@@ -130,6 +130,10 @@ module Cucumber | |
opts.on("-S", "--strict", "Fail if there are any undefined steps.") do | |
@options[:strict] = true | |
end | |
+ opts.on("-M", "--must-not-pass", "Fail if any scenarios pass.") do | |
+ exit_with_error("You can't use both --strict and --must-not-pass") if @options[:strict] | |
+ @options[:must_not_pass] = true | |
+ end | |
opts.on("-v", "--verbose", "Show the files and features loaded.") do | |
@options[:verbose] = true | |
end | |
@@ -166,6 +170,10 @@ module Cucumber | |
@options[:strict] | |
end | |
+ def must_not_pass? | |
+ @options[:must_not_pass] == true | |
+ end | |
+ | |
def guess? | |
@options[:guess] | |
end | |
diff --git a/lib/cucumber/cli/main.rb b/lib/cucumber/cli/main.rb | |
index 9295829..5c112ab 100644 | |
--- a/lib/cucumber/cli/main.rb | |
+++ b/lib/cucumber/cli/main.rb | |
@@ -26,22 +26,26 @@ module Cucumber | |
@out_stream = out_stream == STDOUT ? Formatter::ColorIO.new : out_stream | |
@error_stream = error_stream | |
end | |
- | |
+ | |
def execute!(step_mother) | |
configuration.load_language | |
step_mother.options = configuration.options | |
require_files | |
enable_diffing | |
- | |
+ | |
features = load_plain_text_features | |
visitor = configuration.build_formatter_broadcaster(step_mother) | |
step_mother.visitor = visitor # Needed to support World#announce | |
visitor.visit_features(features) | |
- failure = step_mother.steps(:failed).any? || | |
+ if configuration.must_not_pass? | |
+ failure = step_mother.scenarios(:passed).any? | |
+ else | |
+ failure = step_mother.steps(:failed).any? || | |
(configuration.strict? && step_mother.steps(:undefined).any?) | |
+ end | |
Kernel.exit(failure ? 1 : 0) | |
end | |
@@ -64,14 +68,14 @@ module Cucumber | |
def configuration | |
return @configuration if @configuration | |
- | |
+ | |
@configuration = Configuration.new(@out_stream, @error_stream) | |
@configuration.parse!(@args) | |
@configuration | |
end | |
private | |
- | |
+ | |
def require_files | |
verbose_log("Ruby files required:") | |
configuration.files_to_require.each do |lib| | |
@@ -101,7 +105,7 @@ module Cucumber | |
::Spec::Expectations.differ = ::Spec::Expectations::Differs::Default.new(options) | |
end | |
end | |
- | |
+ | |
end | |
end | |
end | |
diff --git a/lib/cucumber/formatter/console.rb b/lib/cucumber/formatter/console.rb | |
index 53cea88..19d94a8 100644 | |
--- a/lib/cucumber/formatter/console.rb | |
+++ b/lib/cucumber/formatter/console.rb | |
@@ -81,10 +81,20 @@ module Cucumber | |
text += snippets.join("\n\n") | |
@io.puts format_string(text, :undefined) | |
+ | |
@io.puts | |
@io.flush | |
end | |
+ def print_must_not_pass_report(options) | |
+ return unless options[:must_not_pass] | |
+ passed = step_mother.scenarios(:passed) | |
+ if passed.any? | |
+ @io.puts "\nSome scenarios passed, but the --must-not-pass switch was used" | |
+ print_elements(passed, :passed, "scenarios") | |
+ end | |
+ end | |
+ | |
def announce(announcement) | |
@io.puts | |
@io.puts(format_string(announcement, :tag)) | |
diff --git a/lib/cucumber/formatter/pretty.rb b/lib/cucumber/formatter/pretty.rb | |
index f58ab12..2488421 100644 | |
--- a/lib/cucumber/formatter/pretty.rb | |
+++ b/lib/cucumber/formatter/pretty.rb | |
@@ -48,7 +48,7 @@ module Cucumber | |
def visit_comment_line(comment_line) | |
unless comment_line.blank? | |
- @io.puts(comment_line.indent(@indent)) | |
+ @io.puts(comment_line.indent(@indent)) | |
@io.flush | |
end | |
end | |
@@ -56,7 +56,7 @@ module Cucumber | |
def visit_tags(tags) | |
tags.accept(self) | |
if @indent == 1 | |
- @io.puts | |
+ @io.puts | |
@io.flush | |
end | |
end | |
@@ -155,7 +155,7 @@ module Cucumber | |
super | |
@io.puts | |
if table_row.exception && !@exceptions.index(table_row.exception) | |
- print_exception(table_row.exception, :failed, @indent) | |
+ print_exception(table_row.exception, :failed, @indent) | |
end | |
end | |
@@ -177,6 +177,7 @@ module Cucumber | |
def print_summary | |
print_counts | |
print_snippets(@options) | |
+ print_must_not_pass_report(@options) | |
end | |
end | |
diff --git a/lib/cucumber/formatter/progress.rb b/lib/cucumber/formatter/progress.rb | |
index 79bf387..f1dfcfc 100644 | |
--- a/lib/cucumber/formatter/progress.rb | |
+++ b/lib/cucumber/formatter/progress.rb | |
@@ -39,6 +39,7 @@ module Cucumber | |
print_steps(:failed) | |
print_counts | |
print_snippets(@options) | |
+ print_must_not_pass_report(@options) | |
end | |
CHARS = { | |
@@ -54,7 +55,7 @@ module Cucumber | |
@io.print(format_string(char, status)) | |
@io.flush | |
end | |
- | |
+ | |
end | |
end | |
end | |
diff --git a/lib/cucumber/rake/task.rb b/lib/cucumber/rake/task.rb | |
index 24a87b4..941ae9a 100644 | |
--- a/lib/cucumber/rake/task.rb | |
+++ b/lib/cucumber/rake/task.rb | |
@@ -8,7 +8,7 @@ module Cucumber | |
# | |
# Cucumber::Rake::Task.new | |
# | |
- # This will create a task named 'features' described as 'Run Features with | |
+ # This will create a task named 'features' described as 'Run Features with | |
# Cucumber'. It will use steps from 'features/**/*.rb' and features in 'features/**/*.feature'. | |
# | |
# To further configure the task, you can pass a block: | |
@@ -22,7 +22,7 @@ module Cucumber | |
# Cucumber::Rake::Task.new do |t| | |
# t.rcov = true | |
# end | |
- # | |
+ # | |
# See the attributes for additional configuration possibilities. | |
class Task | |
LIB = File.expand_path(File.dirname(__FILE__) + '/../..') # :nodoc: | |
@@ -31,10 +31,10 @@ module Cucumber | |
def self.deprecate_accessor(attribute) # :nodoc: | |
attr_reader attribute | |
class_eval <<-EOF, __FILE__, __LINE__ + 1 | |
- def #{attribute}=(value) | |
- @#{attribute} = value | |
- warn("Cucumber::Rake::Task##{attribute} is deprecated and will be removed in 0.4.0. Please use profiles for complex settings: http://wiki.github.com/aslakhellesoy/cucumber/using-rake#profiles") | |
- end | |
+ def #{attribute}=(value) | |
+ @#{attribute} = value | |
+ warn("Cucumber::Rake::Task##{attribute} is deprecated and will be removed in 0.4.0. Please use profiles for complex settings: http://wiki.github.com/aslakhellesoy/cucumber/using-rake#profiles") | |
+ end | |
EOF | |
end | |
@@ -44,12 +44,12 @@ module Cucumber | |
attr_accessor :binary | |
# Array of paths to specific step definition files to use | |
deprecate_accessor :step_list | |
- # File pattern for finding step definitions. Defaults to | |
+ # File pattern for finding step definitions. Defaults to | |
# 'features/**/*.rb'. | |
deprecate_accessor :step_pattern | |
- # Array of paths to specific features to run. | |
+ # Array of paths to specific features to run. | |
deprecate_accessor :feature_list | |
- # File pattern for finding features to run. Defaults to | |
+ # File pattern for finding features to run. Defaults to | |
# 'features/**/*.feature'. Can be overridden by the FEATURE environment variable. | |
deprecate_accessor :feature_pattern | |
# Extra options to pass to the cucumber binary. Can be overridden by the CUCUMBER_OPTS environment variable. | |
@@ -105,7 +105,7 @@ module Cucumber | |
if rcov | |
args = (['-I'] + lib_args + ['-S', 'rcov'] + rcov_opts + | |
- cucumber_bin + ['--'] + cuc_opts + feature_files(task_args)).flatten | |
+ cucumber_bin + ['--'] + cuc_opts + feature_files(task_args)).flatten | |
else | |
args = (['-I'] + lib_args + cucumber_bin + cuc_opts + feature_files(task_args)).flatten | |
end | |
@@ -159,5 +159,63 @@ module Cucumber | |
end | |
+ # Defines a convenience Rake task for running a regression suite. | |
+ # | |
+ # The simplest use of it goes something like: | |
+ # | |
+ # Cucumber::Rake::RegressionTask.new | |
+ # | |
+ # This will create a task named 'regression' | |
+ # | |
+ # Cucumber::Rake::Task.new do |t| | |
+ # t.cucumber_opts = "--strict --tags ~@in_progress" | |
+ # end | |
+ # | |
+ # Note that this will not work if you want to pass your own --tags option | |
+ # In this case it is recommended to simply use Cucumber::Rake::Task | |
+ class RegressionTask < Task | |
+ | |
+ def initialize(task_name = "regression", desc = "Run a regression suite comprised of all scenarios not marked @in_progress") | |
+ super(task_name, desc) | |
+ end | |
+ | |
+ def arguments_for_ruby_execution(task_args = nil) | |
+ args = super(task_args) | |
+ args << "--strict" | |
+ args << "-t~@in_progress" | |
+ args | |
+ end | |
+ | |
+ end | |
+ | |
+ # Defines a convenience Rake task for running all your currently in progress features. | |
+ # | |
+ # The simplest use of it goes something like: | |
+ # | |
+ # Cucumber::Rake::InProgressTask.new | |
+ # | |
+ # This will create a task named 'in_progress' | |
+ # | |
+ # Cucumber::Rake::Task.new do |t| | |
+ # t.cucumber_opts = "--must-not-pass --tags @in_progress" | |
+ # end | |
+ # | |
+ # Note that this will not work if you want to pass your own --tags option | |
+ # In this case it is recommended to simply use Cucumber::Rake::Task | |
+ class InProgressTask < Task | |
+ | |
+ def initialize(task_name = "in_progress", desc = "Run a suite comprised of all scenarios marked @in_progress and expect none of them to pass yet") | |
+ super(task_name, desc) | |
+ end | |
+ | |
+ def arguments_for_ruby_execution(task_args = nil) | |
+ args = super(task_args) | |
+ args << "--must-not-pass" | |
+ args << "-t@in_progress" | |
+ args | |
+ end | |
+ | |
+ end | |
+ | |
end | |
end | |
diff --git a/spec/cucumber/ast/example_cells_spec.rb b/spec/cucumber/ast/example_cells_spec.rb | |
new file mode 100644 | |
index 0000000..72a9523 | |
--- /dev/null | |
+++ b/spec/cucumber/ast/example_cells_spec.rb | |
@@ -0,0 +1,26 @@ | |
+require File.dirname(__FILE__) + '/../../spec_helper' | |
+ | |
+module Cucumber | |
+ module Ast | |
+ | |
+ describe OutlineTable::ExampleCells do | |
+ | |
+ it "should generate a backtrace line by passing cell contents and line to scenario outline " do | |
+ cell_one = "stub cell" | |
+ cell_one.stub!(:value).and_return("cell one") | |
+ cell_one.stub!(:line).and_return("4") | |
+ cell_two = "stub cell" | |
+ cell_two.stub!(:value).and_return("cell two") | |
+ cells =[cell_one, cell_two] | |
+ | |
+ example_cells = OutlineTable::ExampleCells.new(nil, cells) | |
+ @scenario_outline = "mock outline" | |
+ @scenario_outline.stub!(:step_invocations).and_return(nil) | |
+ example_cells.create_step_invocations!(@scenario_outline) | |
+ @scenario_outline.should_receive(:backtrace_line).with("|cell one|cell two|","4").and_return("result") | |
+ example_cells.backtrace_line.should eql("result") | |
+ end | |
+ | |
+ end | |
+ end | |
+end | |
diff --git a/spec/cucumber/ast/feature_element_spec.rb b/spec/cucumber/ast/feature_element_spec.rb | |
index b683d4f..2c21dc2 100644 | |
--- a/spec/cucumber/ast/feature_element_spec.rb | |
+++ b/spec/cucumber/ast/feature_element_spec.rb | |
@@ -8,24 +8,24 @@ module Cucumber | |
describe "with multiline names" do | |
it "should select the longest line as the text length" do | |
- @keyword = "key" | |
+ @keyword = "key" | |
@name = "short\nvery longer\ntiny" | |
text_length.should == 11 + Ast::Step::INDENT - 1 | |
end | |
- | |
+ | |
it "should add keyword to first lines length" do | |
- @keyword = "key" | |
+ @keyword = "key" | |
@name = "short\nvery longer\ntiny" | |
- | |
+ | |
first_line_length.should == (@keyword.jlength) + (first_line_name_length = 5) | |
end | |
end | |
- | |
+ | |
describe "with empty name" do | |
it "should only return the length of the keyword" do | |
@name = "" | |
@keyword = "key" | |
- | |
+ | |
text_length.should == 3 | |
end | |
end | |
@@ -34,7 +34,32 @@ module Cucumber | |
@name = 'test' | |
matches_scenario_names?([/es/]).should be_true | |
end | |
- | |
+ | |
+ it "should generate a backtrace including keyword ,name and line" do | |
+ @keyword = "key" | |
+ @name = "name" | |
+ @line = "2" | |
+ @feature = "mock feature" | |
+ @feature.should_receive(:backtrace_line).with("key name","2").and_return("full line") | |
+ backtrace_line.should eql("full line") | |
+ end | |
+ | |
+ it "should be able to generate a backtrace with extra name info and overridden line" do | |
+ @keyword = "key" | |
+ @name = "name" | |
+ @line = "2" | |
+ @feature = "mock feature" | |
+ @feature.should_receive(:backtrace_line).with("key name : extra name","3").and_return("full line") | |
+ backtrace_line("extra name", "3").should eql("full line") | |
+ end | |
+ | |
+ it "should generate an empty backtrace if there is no feature" do | |
+ @keyword = "key" | |
+ @name = "name" | |
+ @line = "2" | |
+ backtrace_line.should be_nil | |
+ end | |
+ | |
+ | |
end | |
end | |
- | |
diff --git a/spec/cucumber/cli/configuration_spec.rb b/spec/cucumber/cli/configuration_spec.rb | |
index 4f08a3d..b67c3a5 100644 | |
--- a/spec/cucumber/cli/configuration_spec.rb | |
+++ b/spec/cucumber/cli/configuration_spec.rb | |
@@ -129,7 +129,7 @@ END_OF_MESSAGE | |
end | |
end | |
- it "should procide a helpful error message when the YAML can not be parsed" do | |
+ it "should provide a helpful error message when the YAML can not be parsed" do | |
expected_error_message = /cucumber.yml was found, but could not be parsed. Please refer to cucumber's documentation on correct profile usage./ | |
given_cucumber_yml_defined_as("input that causes an exception in YAML loading") | |
@@ -213,6 +213,25 @@ END_OF_MESSAGE | |
config.parse!(['--no-color']) | |
end | |
+ it "should accept --must-not-pass option" do | |
+ config = Configuration.new | |
+ config.parse!(%w{--must-not-pass}) | |
+ config.must_not_pass?.should be_true | |
+ end | |
+ | |
+ it "should default --must-not-pass to off" do | |
+ config = Configuration.new | |
+ config.parse!(%w{}) | |
+ config.must_not_pass?.should be_false | |
+ end | |
+ | |
+ it "should provide a helpful error message when using incompatible --strict and --must-not-pass" do | |
+ expected_error_message = /You can't use both --strict and --must-not-pass/ | |
+ config = Configuration.new(StringIO.new, error = StringIO.new) | |
+ config.parse!(%w{--strict --must-not-pass}) | |
+ error.string.should match(expected_error_message) | |
+ end | |
+ | |
it "should parse tags" do | |
config = Configuration.new(nil) | |
includes, excludes = config.parse_tags("one,~two,@three,~@four") | |
diff --git a/spec/cucumber/cli/main_spec.rb b/spec/cucumber/cli/main_spec.rb | |
index 635a1e6..47246b1 100644 | |
--- a/spec/cucumber/cli/main_spec.rb | |
+++ b/spec/cucumber/cli/main_spec.rb | |
@@ -14,8 +14,27 @@ module Cucumber | |
Kernel.stub!(:exit).and_return(nil) | |
end | |
+ describe "must not pass mode" do | |
+ before(:each) do | |
+ @configuration = mock('Configuration', :null_object => true) | |
+ Configuration.should_receive(:new).and_return(@configuration) | |
+ @configuration.should_receive(:must_not_pass?).and_return(true) | |
+ | |
+ @step_mother = mock('StepMother', :null_object => true) | |
+ | |
+ @cli = Main.new(nil, @out) | |
+ end | |
+ | |
+ it "should pass when there no passing scenarios" do | |
+ @step_mother.should_receive(:scenarios).with(:passed).and_return([]) | |
+ Kernel.should_receive(:exit).with(0).and_return(nil) | |
+ @cli.execute!(@step_mother) | |
+ end | |
+ | |
+ end | |
+ | |
describe "verbose mode" do | |
- | |
+ | |
before(:each) do | |
@empty_feature = Ast::Feature.new(nil, Ast::Comment.new(''), Ast::Tags.new(2, []), "Feature", []) | |
Dir.stub!(:[]) | |
@@ -24,23 +43,23 @@ module Cucumber | |
it "should show ruby files required" do | |
@cli = Main.new(%w{--verbose --require example.rb}, @out) | |
@cli.stub!(:require) | |
- | |
+ | |
@cli.execute!(Object.new.extend(StepMother)) | |
- | |
+ | |
@out.string.should include('example.rb') | |
end | |
- | |
+ | |
it "should show feature files parsed" do | |
@cli = Main.new(%w{--verbose example.feature}, @out) | |
@cli.stub!(:require) | |
- | |
+ | |
Parser::FeatureParser.stub!(:new).and_return(mock("feature parser", :parse_file => @empty_feature)) | |
- | |
+ | |
@cli.execute!(Object.new.extend(StepMother)) | |
@out.string.should include('example.feature') | |
end | |
- | |
+ | |
end | |
describe "diffing" do | |
@@ -48,33 +67,33 @@ module Cucumber | |
before :each do | |
@configuration = mock('Configuration', :null_object => true) | |
Configuration.should_receive(:new).and_return(@configuration) | |
- | |
+ | |
@step_mother = mock('StepMother', :null_object => true) | |
- | |
+ | |
@cli = Main.new(nil, @out) | |
end | |
- | |
+ | |
it "uses Spec Differ::Default when diff is enabled" do | |
@configuration.should_receive(:diff_enabled?).and_return(true) | |
- | |
+ | |
::Spec::Expectations::Differs::Default.should_receive(:new) | |
- | |
+ | |
@cli.execute!(@step_mother) | |
end | |
- | |
+ | |
it "does not use Spec Differ::Default when diff is disabled" do | |
@configuration.should_receive(:diff_enabled?).and_return(false) | |
- | |
+ | |
::Spec::Expectations::Differs::Default.should_not_receive(:new) | |
- | |
+ | |
@cli.execute!(@step_mother) | |
end | |
- | |
+ | |
end | |
describe "--format with class" do | |
- | |
- describe "in module" do | |
+ | |
+ describe "in module" do | |
it "should resolve each module until it gets Formatter class" do | |
cli = Main.new(%w{--format ZooModule::MonkeyFormatterClass}, nil) | |
@@ -90,7 +109,7 @@ module Cucumber | |
cli.execute!(Object.new.extend(StepMother)) | |
end | |
- end | |
+ end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment