diff --git a/.travis.yml b/.travis.yml index c9f38d0cc7..5b9c687432 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,5 @@ rvm: + - 2.0.0 - 1.9.3 - 1.8.7 diff --git a/cucumber.yml b/cucumber.yml index abbd4ddad1..4998208ec5 100644 --- a/cucumber.yml +++ b/cucumber.yml @@ -15,6 +15,7 @@ jruby: <%= std_opts %> --tags ~@spork --tags ~@wire jruby_win: <%= std_opts %> --tags ~@spork --tags ~@wire CUCUMBER_FORWARD_SLASH_PATHS=true windows_mri: <%= std_opts %> --tags ~@jruby --tags ~@spork --tags ~@wire --tags ~@needs-many-fonts CUCUMBER_FORWARD_SLASH_PATHS=true ruby_1_9: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 +ruby_2_0: <%= std_opts %> --tags ~@jruby --tags ~@fails_on_1_9 wip: --tags @wip:3 --wip features none: --format pretty rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip diff --git a/features/.cucumber/stepdefs.json b/features/.cucumber/stepdefs.json index 5d5e808be2..0994d0f15e 100644 --- a/features/.cucumber/stepdefs.json +++ b/features/.cucumber/stepdefs.json @@ -1,1876 +1,1100 @@ [ { + "source": "The default aruba timeout is (\\d+) seconds", "flags": "", - "source": "^I am in (.*)$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:7", "steps": [ - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:5" + ] }, { + "source": "^I'm using a clean gemset \"([^\"]*)\"$", "flags": "", - "source": "^a standard Cucumber project directory structure$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:11", "steps": [ - { - "args": [ - ], - "name": "a standard Cucumber project directory structure" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:9" + ] }, { + "source": "^a directory named \"([^\"]*)\"$", "flags": "", - "source": "^the (.*) directory is empty$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:15", "steps": [ - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:18" + ] }, { + "source": "^a file named \"([^\"]*)\" with:$", "flags": "", - "source": "^a file named \"([^\"]*)\"$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:19", "steps": [ { + "name": "a file named \"features/action.feature\" with:", "args": [ { "offset": 14, - "val": "features/step_definitions/foof.rb" - } - ], - "name": "a file named \"features/step_definitions/foof.rb\"" - }, - { - "args": [ - { - "offset": 14, - "val": "features/step_definitions/foot.rb" - } - ], - "name": "a file named \"features/step_definitions/foot.rb\"" - }, - { - "args": [ - { - "offset": 14, - "val": "features/step_definitions/fooz.rb" + "val": "features/action.feature" } - ], - "name": "a file named \"features/step_definitions/fooz.rb\"" + ] }, { + "name": "a file named \"features/doc_string.feature\" with:", "args": [ { "offset": 14, - "val": "features/support/dont_require_me.rb" - } - ], - "name": "a file named \"features/support/dont_require_me.rb\"" - }, - { - "args": [ - { - "offset": 14, - "val": "features/support/env.rb" - } - ], - "name": "a file named \"features/support/env.rb\"" - }, - { - "args": [ - { - "offset": 14, - "val": "features/support/require_me.rb" - } - ], - "name": "a file named \"features/support/require_me.rb\"" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:25" - }, - { - "flags": "", - "source": "^a file named \"([^\"]*)\" with:$", - "steps": [ - { - "args": [ - { - "offset": 14, - "val": "Rakefile" + "val": "features/doc_string.feature" } - ], - "name": "a file named \"Rakefile\" with:" + ] }, { + "name": "a file named \"features/f.feature\" with:", "args": [ { "offset": 14, - "val": "features/all_good.feature" + "val": "features/f.feature" } - ], - "name": "a file named \"features/all_good.feature\" with:" + ] }, { + "name": "a file named \"features/only_background_and_hooks.feature\" with:", "args": [ { "offset": 14, - "val": "features/another.feature" + "val": "features/only_background_and_hooks.feature" } - ], - "name": "a file named \"features/another.feature\" with:" + ] }, { + "name": "a file named \"features/only_background_and_hooks_steps.rb\" with:", "args": [ { "offset": 14, - "val": "features/env.rb" + "val": "features/only_background_and_hooks_steps.rb" } - ], - "name": "a file named \"features/env.rb\" with:" + ] }, { + "name": "a file named \"features/step_definitions/doc_string_steps.rb\" with:", "args": [ { "offset": 14, - "val": "features/f.feature" + "val": "features/step_definitions/doc_string_steps.rb" } - ], - "name": "a file named \"features/f.feature\" with:" + ] }, { + "name": "a file named \"features/step_definitions/multiline_steps.rb\" with:", "args": [ { "offset": 14, - "val": "features/lolcat.feature" + "val": "features/step_definitions/multiline_steps.rb" } - ], - "name": "a file named \"features/lolcat.feature\" with:" + ] }, { + "name": "a file named \"features/step_definitions/steps.rb\" with:", "args": [ { "offset": 14, - "val": "features/naughty_step_in_before.feature" + "val": "features/step_definitions/steps.rb" } - ], - "name": "a file named \"features/naughty_step_in_before.feature\" with:" + ] }, { + "name": "a file named \"features/support/hooks.rb\" with:", "args": [ { "offset": 14, - "val": "features/naughty_step_in_scenario.feature" + "val": "features/support/hooks.rb" } - ], - "name": "a file named \"features/naughty_step_in_scenario.feature\" with:" + ] }, { + "name": "a file named \"features/support/jb/formatter.rb\" with:", "args": [ { "offset": 14, - "val": "features/naughty_step_in_scenario_outline.feature" + "val": "features/support/jb/formatter.rb" } - ], - "name": "a file named \"features/naughty_step_in_scenario_outline.feature\" with:" + ] }, { + "name": "a file named \"features/support/ze/formator.rb\" with:", "args": [ { "offset": 14, - "val": "features/sample.feature" + "val": "features/support/ze/formator.rb" } - ], - "name": "a file named \"features/sample.feature\" with:" + ] }, { + "name": "a file named \"features/test.feature\" with:", "args": [ { "offset": 14, - "val": "features/spaces are nasty.feature" + "val": "features/test.feature" } - ], - "name": "a file named \"features/spaces are nasty.feature\" with:" - }, + ] + } + ] + }, + { + "source": "^a (\\d+) byte file named \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:23", + "steps": [ + + ] + }, + { + "source": "^an empty file named \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:27", + "steps": [ + + ] + }, + { + "source": "^I write to \"([^\"]*)\" with:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:31", + "steps": [ + + ] + }, + { + "source": "^I overwrite \"([^\"]*)\" with:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:35", + "steps": [ + + ] + }, + { + "source": "^I append to \"([^\"]*)\" with:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:39", + "steps": [ + + ] + }, + { + "source": "^I append to \"([^\"]*)\" with \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:43", + "steps": [ + + ] + }, + { + "source": "^I remove the file \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:47", + "steps": [ + + ] + }, + { + "source": "^I cd to \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:51", + "steps": [ + + ] + }, + { + "source": "^I run \"(.*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:55", + "steps": [ + + ] + }, + { + "source": "^I run `([^`]*)`$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:60", + "steps": [ { + "name": "I run `cucumber -f stepdefs --dry-run`", "args": [ { - "offset": 14, - "val": "features/step_definitions/all_your_steps_are_belong_to_us.rb" + "offset": 7, + "val": "cucumber -f stepdefs --dry-run" } - ], - "name": "a file named \"features/step_definitions/all_your_steps_are_belong_to_us.rb\" with:" + ] }, { + "name": "I run `cucumber -f usage --dry-run`", "args": [ { - "offset": 14, - "val": "features/step_definitions/foo_steps.rb" + "offset": 7, + "val": "cucumber -f usage --dry-run" } - ], - "name": "a file named \"features/step_definitions/foo_steps.rb\" with:" + ] }, { + "name": "I run `cucumber -q -t @one -t @three features/tagulicious.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/server.wire" + "offset": 7, + "val": "cucumber -q -t @one -t @three features/tagulicious.feature" } - ], - "name": "a file named \"features/step_definitions/server.wire\" with:" + ] }, { + "name": "I run `cucumber -q -t @one,@three features/tagulicious.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/some_remote_place.wire" + "offset": 7, + "val": "cucumber -q -t @one,@three features/tagulicious.feature" } - ], - "name": "a file named \"features/step_definitions/some_remote_place.wire\" with:" + ] }, { + "name": "I run `cucumber -q features/background_tagged_before_on_outline.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/steps.rb" + "offset": 7, + "val": "cucumber -q features/background_tagged_before_on_outline.feature" } - ], - "name": "a file named \"features/step_definitions/steps.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/failing_background.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/success.rb" + "offset": 7, + "val": "cucumber -q features/failing_background.feature" } - ], - "name": "a file named \"features/step_definitions/success.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/failing_background_after_success.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/t_steps.rb" + "offset": 7, + "val": "cucumber -q features/failing_background_after_success.feature" } - ], - "name": "a file named \"features/step_definitions/t_steps.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/multiline_args_background.feature`", "args": [ { - "offset": 14, - "val": "features/step_definitions/table_steps.rb" + "offset": 7, + "val": "cucumber -q features/multiline_args_background.feature" } - ], - "name": "a file named \"features/step_definitions/table_steps.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/passing_background.feature:9`", "args": [ { - "offset": 14, - "val": "features/success.feature" + "offset": 7, + "val": "cucumber -q features/passing_background.feature:9" } - ], - "name": "a file named \"features/success.feature\" with:" + ] }, { + "name": "I run `cucumber -q features/passing_background.feature`", "args": [ { - "offset": 14, - "val": "features/support/env.rb" + "offset": 7, + "val": "cucumber -q features/passing_background.feature" } - ], - "name": "a file named \"features/support/env.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/pending_background.feature`", "args": [ { - "offset": 14, - "val": "features/support/hooks.rb" + "offset": 7, + "val": "cucumber -q features/pending_background.feature" } - ], - "name": "a file named \"features/support/hooks.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/scenario_outline_failing_background.feature`", "args": [ { - "offset": 14, - "val": "features/support/table.rb" + "offset": 7, + "val": "cucumber -q features/scenario_outline_failing_background.feature" } - ], - "name": "a file named \"features/support/table.rb\" with:" + ] }, { + "name": "I run `cucumber -q features/scenario_outline_passing_background.feature`", "args": [ { - "offset": 14, - "val": "features/t.feature" + "offset": 7, + "val": "cucumber -q features/scenario_outline_passing_background.feature" } - ], - "name": "a file named \"features/t.feature\" with:" + ] }, { + "name": "I run `cucumber -q features/tagulicious.feature`", "args": [ { - "offset": 14, - "val": "features/tables.feature" + "offset": 7, + "val": "cucumber -q features/tagulicious.feature" } - ], - "name": "a file named \"features/tables.feature\" with:" + ] }, { + "name": "I run `cucumber features/f.feature:2`", "args": [ { - "offset": 14, - "val": "features/transform_sample.feature" + "offset": 7, + "val": "cucumber features/f.feature:2" } - ], - "name": "a file named \"features/transform_sample.feature\" with:" + ] }, { + "name": "I run `cucumber features/f.feature:6`", "args": [ { - "offset": 14, - "val": "features/unicode.feature" + "offset": 7, + "val": "cucumber features/f.feature:6" } - ], - "name": "a file named \"features/unicode.feature\" with:" + ] }, { + "name": "I run `cucumber features/only_background_and_hooks.feature`", "args": [ { - "offset": 14, - "val": "features/wired.feature" + "offset": 7, + "val": "cucumber features/only_background_and_hooks.feature" } - ], - "name": "a file named \"features/wired.feature\" with:" + ] }, { + "name": "I run `cucumber features/test.feature:5 -f progress`", "args": [ { - "offset": 14, - "val": "features/wired_on_tables.feature" + "offset": 7, + "val": "cucumber features/test.feature:5 -f progress" } - ], - "name": "a file named \"features/wired_on_tables.feature\" with:" + ] }, { + "name": "I run `cucumber features/test.feature:8 -f progress`", "args": [ { - "offset": 14, - "val": "features/x.feature" + "offset": 7, + "val": "cucumber features/test.feature:8 -f progress" } - ], - "name": "a file named \"features/x.feature\" with:" + ] }, { + "name": "I run `cucumber`", "args": [ { - "offset": 14, - "val": "my_weird/place/foo_steps.rb" + "offset": 7, + "val": "cucumber" } - ], - "name": "a file named \"my_weird/place/foo_steps.rb\" with:" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:29" + ] }, { + "source": "^I successfully run \"(.*)\"$", "flags": "", - "source": "^the following profiles? (?:are|is) defined:$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:64", "steps": [ - { - "args": [ - ], - "name": "the following profile is defined:" - }, - { - "args": [ + ] + }, + { + "source": "^I successfully run `(.*?)`(?: for up to (\\d+) seconds)?$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:71", + "steps": [ - ], - "name": "the following profiles are defined:" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:33" + ] }, { + "source": "^I run \"([^\"]*)\" interactively$", "flags": "", - "source": "^I am running spork in the background$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:75", "steps": [ - { - "args": [ - ], - "name": "I am running spork in the background" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:37" + ] + }, + { + "source": "^I run `([^`]*)` interactively$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:80", + "steps": [ + + ] + }, + { + "source": "^I type \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:84", + "steps": [ + + ] + }, + { + "source": "^I wait for (?:output|stdout) to contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:88", + "steps": [ + + ] }, { + "source": "^the output should contain \"([^\"]*)\"$", "flags": "", - "source": "^I am running spork in the background on port (\\d+)$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:97", "steps": [ { + "name": "the output should contain \"WARNING\"", "args": [ { - "offset": 45, - "val": "9000" + "offset": 27, + "val": "WARNING" } - ], - "name": "I am running spork in the background on port 9000" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:41" + ] + }, + { + "source": "^the output from \"([^\"]*)\" should contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:101", + "steps": [ + + ] + }, + { + "source": "^the output from \"([^\"]*)\" should not contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:105", + "steps": [ + + ] + }, + { + "source": "^the output should not contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:109", + "steps": [ + + ] }, { + "source": "^the output should contain:$", "flags": "", - "source": "^I am not running (?:.*) in the background$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:113", "steps": [ { + "name": "the output should contain:", "args": [ - ], - "name": "I am not running a DRb server in the background" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:45" + ] + }, + { + "source": "^the output should not contain:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:117", + "steps": [ + + ] + }, + { + "source": "^the output(?: from \"(.*?)\")? should contain exactly \"(.*?)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:123", + "steps": [ + + ] + }, + { + "source": "^the output(?: from \"(.*?)\")? should contain exactly:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:129", + "steps": [ + + ] + }, + { + "source": "^the output should match /([^/]*)/$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:137", + "steps": [ + + ] + }, + { + "source": "^the output should match:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:141", + "steps": [ + + ] + }, + { + "source": "^the output should not match /([^/]*)/$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:146", + "steps": [ + + ] + }, + { + "source": "^the output should not match:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:150", + "steps": [ + + ] + }, + { + "source": "^the exit status should be (\\d+)$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:154", + "steps": [ + + ] + }, + { + "source": "^the exit status should not be (\\d+)$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:158", + "steps": [ + + ] }, { + "source": "^it should (pass|fail) with:$", "flags": "", - "source": "^I have environment variable (\\w+) set to \"([^\"]*)\"$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:162", "steps": [ { + "name": "it should fail with:", "args": [ { - "offset": 28, - "val": "CUCUMBER_DRB" - }, - { - "offset": 49, - "val": "9000" + "offset": 10, + "val": "fail" } - ], - "name": "I have environment variable CUCUMBER_DRB set to \"9000\"" + ] }, { + "name": "it should pass with:", "args": [ { - "offset": 28, - "val": "PORT" - }, - { - "offset": 41, - "val": "16816" + "offset": 10, + "val": "pass" } - ], - "name": "I have environment variable PORT set to \"16816\"" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:49" + ] }, { + "source": "^it should (pass|fail) with exactly:$", "flags": "", - "source": "^I run cucumber (.*)$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:166", "steps": [ { + "name": "it should fail with exactly:", "args": [ { - "offset": 15, - "val": "--autoformat tmp/formatted features" - } - ], - "name": "I run cucumber --autoformat tmp/formatted features" - }, - { - "args": [ - { - "offset": 15, - "val": "--backtrace -s features" - } - ], - "name": "I run cucumber --backtrace -s features" - }, - { - "args": [ - { - "offset": 15, - "val": "--dry-run --no-snippets -f progress" - } - ], - "name": "I run cucumber --dry-run --no-snippets -f progress" - }, - { - "args": [ - { - "offset": 15, - "val": "--dry-run --no-source features/*.feature --tags ~@lots" - } - ], - "name": "I run cucumber --dry-run --no-source features/*.feature --tags ~@lots" - }, - { - "args": [ - { - "offset": 15, - "val": "--dry-run -f progress" - } - ], - "name": "I run cucumber --dry-run -f progress" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit --out tmp/ features" - } - ], - "name": "I run cucumber --format junit --out tmp/ features" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit --out tmp/ features/one_passing_one_failing.feature" - } - ], - "name": "I run cucumber --format junit --out tmp/ features/one_passing_one_failing.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit --out tmp/ features/pending.feature" + "offset": 10, + "val": "fail" } - ], - "name": "I run cucumber --format junit --out tmp/ features/pending.feature" + ] }, { + "name": "it should pass with exactly:", "args": [ { - "offset": 15, - "val": "--format junit --out tmp/ features/pending.feature --strict" + "offset": 10, + "val": "pass" } - ], - "name": "I run cucumber --format junit --out tmp/ features/pending.feature --strict" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit --out tmp/ features/scenario_outline.feature" - } - ], - "name": "I run cucumber --format junit --out tmp/ features/scenario_outline.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit --out tmp/ features/some_subdirectory/one_passing_one_failing.feature --require features" - } - ], - "name": "I run cucumber --format junit --out tmp/ features/some_subdirectory/one_passing_one_failing.feature --require features" - }, - { - "args": [ - { - "offset": 15, - "val": "--format junit features" - } - ], - "name": "I run cucumber --format junit features" - }, - { - "args": [ - { - "offset": 15, - "val": "--format pretty features/f.feature" - } - ], - "name": "I run cucumber --format pretty features/f.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--format progress --out tmp/progress.txt --format pretty --out tmp/pretty.txt --no-source --dry-run --no-snippets features/lots_of_undefined.feature" - } - ], - "name": "I run cucumber --format progress --out tmp/progress.txt --format pretty --out tmp/pretty.txt --no-source --dry-run --no-snippets features/lots_of_undefined.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--format progress features/f.feature" - } - ], - "name": "I run cucumber --format progress features/f.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--format progress features/puts_world.feature" - } - ], - "name": "I run cucumber --format progress features/puts_world.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "--i18n help" - } - ], - "name": "I run cucumber --i18n help" - }, - { - "args": [ - { - "offset": 15, - "val": "--i18n pt help" - } - ], - "name": "I run cucumber --i18n pt help" - }, - { - "args": [ - { - "offset": 15, - "val": "--name 'Hantu Pisang background' -q features/" - } - ], - "name": "I run cucumber --name 'Hantu Pisang background' -q features/" - }, - { - "args": [ - { - "offset": 15, - "val": "--name Pisang -q features/" - } - ], - "name": "I run cucumber --name Pisang -q features/" - }, - { - "args": [ - { - "offset": 15, - "val": "--profile server" - } - ], - "name": "I run cucumber --profile server" - }, - { - "args": [ - { - "offset": 15, - "val": "-b -s features" - } - ], - "name": "I run cucumber -b -s features" - }, - { - "args": [ - { - "offset": 15, - "val": "-f debug features/sample.feature" - } - ], - "name": "I run cucumber -f debug features/sample.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-f pretty" - } - ], - "name": "I run cucumber -f pretty" - }, - { - "args": [ - { - "offset": 15, - "val": "-f pretty -q" - } - ], - "name": "I run cucumber -f pretty -q" - }, - { - "args": [ - { - "offset": 15, - "val": "-f progress" - } - ], - "name": "I run cucumber -f progress" - }, - { - "args": [ - { - "offset": 15, - "val": "-f progress --backtrace" - } - ], - "name": "I run cucumber -f progress --backtrace" - }, - { - "args": [ - { - "offset": 15, - "val": "-f progress features/t.feature" - } - ], - "name": "I run cucumber -f progress features/t.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-f progress features/wired_on_tables.feature" - } - ], - "name": "I run cucumber -f progress features/wired_on_tables.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-f rerun features/sample.feature features/all_good.feature" - } - ], - "name": "I run cucumber -f rerun features/sample.feature features/all_good.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-f stepdefs --dry-run" - } - ], - "name": "I run cucumber -f stepdefs --dry-run" - }, - { - "args": [ - { - "offset": 15, - "val": "-i -q --expand features/expand_me.feature" - } - ], - "name": "I run cucumber -i -q --expand features/expand_me.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-i features/lolcat.feature" - } - ], - "name": "I run cucumber -i features/lolcat.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-i features/tables.feature" - } - ], - "name": "I run cucumber -i features/tables.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-n Pisang -q features/" - } - ], - "name": "I run cucumber -n Pisang -q features/" - }, - { - "args": [ - { - "offset": 15, - "val": "-p default features/another.feature" - } - ], - "name": "I run cucumber -p default features/another.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-p foo" - } - ], - "name": "I run cucumber -p foo" - }, - { - "args": [ - { - "offset": 15, - "val": "-q --dry-run features/unicode.feature" - } - ], - "name": "I run cucumber -q --dry-run features/unicode.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q --format html --out tmp/a.html features" - } - ], - "name": "I run cucumber -q --format html --out tmp/a.html features" - }, - { - "args": [ - { - "offset": 15, - "val": "-q --format pretty --format progress --out progress.txt features/f.feature" - } - ], - "name": "I run cucumber -q --format pretty --format progress --out progress.txt features/f.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q --format progress features/outline_sample.feature" - } - ], - "name": "I run cucumber -q --format progress features/outline_sample.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q --format progress features/sample.feature" - } - ], - "name": "I run cucumber -q --format progress features/sample.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -p super -p default -f features/sample.feature --require features/step_definitions/steps.rb" - } - ], - "name": "I run cucumber -q -p super -p default -f features/sample.feature --require features/step_definitions/steps.rb" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -r ../../legacy_features/step_definitions/extra_steps.rb features/sample.feature:5" - } - ], - "name": "I run cucumber -q -r ../../legacy_features/step_definitions/extra_steps.rb features/sample.feature:5" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -t @one features/f.feature" - } - ], - "name": "I run cucumber -q -t @one features/f.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -w -t @failing features/wip.feature" - } - ], - "name": "I run cucumber -q -w -t @failing features/wip.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -w -t @passing features/wip.feature" - } - ], - "name": "I run cucumber -q -w -t @passing features/wip.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -w -t @pending features/wip.feature" - } - ], - "name": "I run cucumber -q -w -t @pending features/wip.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -w -t @undefined features/wip.feature" - } - ], - "name": "I run cucumber -q -w -t @undefined features/wip.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q -w features/passing_outline.feature" - } - ], - "name": "I run cucumber -q -w features/passing_outline.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q @list-of-features.txt" - } - ], - "name": "I run cucumber -q @list-of-features.txt" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features --name \"Test state\"" - } - ], - "name": "I run cucumber -q features --name \"Test state\"" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features --tags @one" - } - ], - "name": "I run cucumber -q features --tags @one" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features --tags @three" - } - ], - "name": "I run cucumber -q features --tags @three" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/f.feature --tag @i_dont_exist" - } - ], - "name": "I run cucumber -q features/f.feature --tag @i_dont_exist" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/failing_expectation.feature" - } - ], - "name": "I run cucumber -q features/failing_expectation.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/outline_sample.feature:7" - } - ], - "name": "I run cucumber -q features/outline_sample.feature:7" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature --no-source --dry-run --tags ~@four" - } - ], - "name": "I run cucumber -q features/sample.feature --no-source --dry-run --tags ~@four" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature:10 --strict" - } - ], - "name": "I run cucumber -q features/sample.feature:10 --strict" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature:12" - } - ], - "name": "I run cucumber -q features/sample.feature:12" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature:5" - } - ], - "name": "I run cucumber -q features/sample.feature:5" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature:5 --strict" - } - ], - "name": "I run cucumber -q features/sample.feature:5 --strict" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/sample.feature:5:16" - } - ], - "name": "I run cucumber -q features/sample.feature:5:16" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/tags_sample.feature --no-source --dry-run --tags @sample_one:1" - } - ], - "name": "I run cucumber -q features/tags_sample.feature --no-source --dry-run --tags @sample_one:1" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/tags_sample.feature --no-source --dry-run --tags @sample_three:1" - } - ], - "name": "I run cucumber -q features/tags_sample.feature --no-source --dry-run --tags @sample_three:1" - }, - { - "args": [ - { - "offset": 15, - "val": "-q features/tags_sample.feature --no-source --dry-run --tags ~@sample_one:1" - } - ], - "name": "I run cucumber -q features/tags_sample.feature --no-source --dry-run --tags ~@sample_one:1" - }, - { - "args": [ - { - "offset": 15, - "val": "-s features" - } - ], - "name": "I run cucumber -s features" - }, - { - "args": [ - { - "offset": 15, - "val": "-v" - } - ], - "name": "I run cucumber -v" - }, - { - "args": [ - { - "offset": 15, - "val": "-v features/ " - } - ], - "name": "I run cucumber -v features/ " - }, - { - "args": [ - { - "offset": 15, - "val": "features" - } - ], - "name": "I run cucumber features" - }, - { - "args": [ - { - "offset": 15, - "val": "features --drb" - } - ], - "name": "I run cucumber features --drb" - }, - { - "args": [ - { - "offset": 15, - "val": "features --drb --port 9000" - } - ], - "name": "I run cucumber features --drb --port 9000" - }, - { - "args": [ - { - "offset": 15, - "val": "features --format pretty" - } - ], - "name": "I run cucumber features --format pretty" - }, - { - "args": [ - { - "offset": 15, - "val": "features --format progress" - } - ], - "name": "I run cucumber features --format progress" - }, - { - "args": [ - { - "offset": 15, - "val": "features -q --verbose --exclude features/support/dont --exclude foo[zf]" - } - ], - "name": "I run cucumber features -q --verbose --exclude features/support/dont --exclude foo[zf]" - }, - { - "args": [ - { - "offset": 15, - "val": "features/ --drb" - } - ], - "name": "I run cucumber features/ --drb" - }, - { - "args": [ - { - "offset": 15, - "val": "features/call_undefined_step_from_step_def.feature" - } - ], - "name": "I run cucumber features/call_undefined_step_from_step_def.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "features/f.feature" - } - ], - "name": "I run cucumber features/f.feature" - }, - { - "args": [ - { - "offset": 15, - "val": "features/f.feature:10" - } - ], - "name": "I run cucumber features/f.feature:10" - }, - { - "args": [ - { - "offset": 15, - "val": "features/f.feature:13" - } - ], - "name": "I run cucumber features/f.feature:13" - }, - { - "args": [ - { - "offset": 15, - "val": "features/f.feature:16" - } - ], - "name": "I run cucumber features/f.feature:16" - }, - { - "args": [ - { - "offset": 15, - "val": "features/f.feature:3" - } - ], - "name": "I run cucumber features/f.feature:3" - }, - { - "args": [ - { - "offset": 15, - "val": "features/multiline_name.feature --no-snippets" - } - ], - "name": "I run cucumber features/multiline_name.feature --no-snippets" - }, - { - "args": [ - { - "offset": 15, - "val": "features/outline_sample.feature:12" - } - ], - "name": "I run cucumber features/outline_sample.feature:12" - }, - { - "args": [ - { - "offset": 15, - "val": "features/sample.feature --profile default --profile super" - } - ], - "name": "I run cucumber features/sample.feature --profile default --profile super" - }, - { - "args": [ - { - "offset": 15, - "val": "features/sample.feature --profile super" - } - ], - "name": "I run cucumber features/sample.feature --profile super" - }, - { - "args": [ - { - "offset": 15, - "val": "features/undefined_multiline_args.feature:3 -s" - } - ], - "name": "I run cucumber features/undefined_multiline_args.feature:3 -s" - }, - { - "args": [ - { - "offset": 15, - "val": "features/undefined_multiline_args.feature:9 -s" - } - ], - "name": "I run cucumber features/undefined_multiline_args.feature:9 -s" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:53" + ] + }, + { + "source": "^it should (pass|fail) with regexp?:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:170", + "steps": [ + + ] }, { + "source": "^the stderr(?: from \"(.*?)\")? should contain( exactly)? \"(.*?)\"$", "flags": "", - "source": "^I run rake (.*)$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:179", "steps": [ - { - "args": [ - { - "offset": 11, - "val": "cucumber" - } - ], - "name": "I run rake cucumber" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:57" + + ] }, { + "source": "^the stderr(?: from \"(.*?)\")? should contain( exactly)?:$", "flags": "", - "source": "^I run the following Ruby code:$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:191", "steps": [ - { - "args": [ - ], - "name": "I run the following Ruby code:" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:61" + ] }, { + "source": "^the stdout(?: from \"(.*?)\")? should contain( exactly)? \"(.*?)\"$", "flags": "", - "source": "^it should (fail|pass)$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:203", "steps": [ - { - "args": [ - { - "offset": 10, - "val": "fail" - } - ], - "name": "it should fail" - }, - { - "args": [ - { - "offset": 10, - "val": "pass" - } - ], - "name": "it should pass" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:65" + + ] }, { + "source": "^the stdout(?: from \"(.*?)\")? should contain( exactly)?:$", "flags": "", - "source": "^it should (fail|pass) with$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:215", "steps": [ - { - "args": [ - { - "offset": 10, - "val": "fail" - } - ], - "name": "it should fail with" - }, - { - "args": [ - { - "offset": 10, - "val": "pass" - } - ], - "name": "it should pass with" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:75" + + ] }, { + "source": "^the stderr should not contain \"([^\"]*)\"$", "flags": "", - "source": "^the output should contain \"([^\"]*)\"$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:223", "steps": [ - { - "args": [ - { - "offset": 27, - "val": "Cucumber::RbSupport::RbWorld" - } - ], - "name": "the output should contain \"Cucumber::RbSupport::RbWorld\"" - }, - { - "args": [ - { - "offset": 27, - "val": "RSpec::Matchers" - } - ], - "name": "the output should contain \"RSpec::Matchers\"" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:82" + + ] }, { + "source": "^the stderr should not contain:$", "flags": "", - "source": "^the output should contain:?$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:227", "steps": [ - { - "args": [ - ], - "name": "the output should contain" - }, - { - "args": [ + ] + }, + { + "source": "^the (stderr|stdout) should not contain anything$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:231", + "steps": [ - ], - "name": "the output should contain:" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:86" + ] }, { + "source": "^the stdout should not contain \"([^\"]*)\"$", "flags": "", - "source": "^the output should not contain$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:236", "steps": [ - { - "args": [ - ], - "name": "the output should not contain" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:90" + ] }, { + "source": "^the stdout should not contain:$", "flags": "", - "source": "^the output should be$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:240", "steps": [ - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:94" + ] }, { + "source": "^the stdout from \"([^\"]*)\" should not contain \"([^\"]*)\"$", "flags": "", - "source": "^it should (fail|pass) with JSON$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:244", "steps": [ - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:98" + ] }, { + "source": "^the stderr from \"([^\"]*)\" should not contain \"([^\"]*)\"$", "flags": "", - "source": "^\"([^\"]*)\" should contain$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:248", "steps": [ - { - "args": [ - { - "offset": 1, - "val": "fixtures/self_test/tmp/formatted/features/sample.feature" - } - ], - "name": "\"fixtures/self_test/tmp/formatted/features/sample.feature\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/self_test/tmp/pretty.txt" - } - ], - "name": "\"fixtures/self_test/tmp/pretty.txt\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/self_test/tmp/progress.txt" - } - ], - "name": "\"fixtures/self_test/tmp/progress.txt\" should contain" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:103" + + ] }, { + "source": "^the file \"([^\"]*)\" should not exist$", "flags": "", - "source": "^\"([^\"]*)\" with junit duration \"([^\"]*)\" should contain$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:252", "steps": [ - { - "args": [ - { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml" - }, - { - "offset": 84, - "val": "0.005" - } - ], - "name": "\"fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml\" with junit duration \"0.005\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-pending.xml" - }, - { - "offset": 68, - "val": "0.000160" - } - ], - "name": "\"fixtures/junit/tmp/TEST-features-pending.xml\" with junit duration \"0.000160\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-pending.xml" - }, - { - "offset": 68, - "val": "0.009" - } - ], - "name": "\"fixtures/junit/tmp/TEST-features-pending.xml\" with junit duration \"0.009\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-scenario_outline.xml" - }, - { - "offset": 77, - "val": "0.005" - } - ], - "name": "\"fixtures/junit/tmp/TEST-features-scenario_outline.xml\" with junit duration \"0.005\" should contain" - }, - { - "args": [ - { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-some_subdirectory-one_passing_one_failing.xml" - }, - { - "offset": 102, - "val": "0.005" - } - ], - "name": "\"fixtures/junit/tmp/TEST-features-some_subdirectory-one_passing_one_failing.xml\" with junit duration \"0.005\" should contain" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:107" + + ] }, { + "source": "^the following files should exist:$", "flags": "", - "source": "^\"([^\"]*)\" should match \"(.+?)\"$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:256", "steps": [ - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:114" + ] }, { + "source": "^the following files should not exist:$", "flags": "", - "source": "^\"([^\"]*)\" should have the same contents as \"([^\"]*)\"$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:260", "steps": [ - { - "args": [ - { - "offset": 1, - "val": "fixtures/self_test/tmp/a.html" - }, - { - "offset": 66, - "val": "legacy_features/html_formatter/a.html" - } - ], - "name": "\"fixtures/self_test/tmp/a.html\" should have the same contents as \"legacy_features/html_formatter/a.html\"" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:118" + + ] }, { + "source": "^a file named \"([^\"]*)\" should exist$", "flags": "", - "source": "^STDERR should match$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:264", "steps": [ - { - "args": [ - ], - "name": "STDERR should match" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:126" + ] }, { + "source": "^a file named \"([^\"]*)\" should not exist$", "flags": "", - "source": "^STDERR should not match$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:268", "steps": [ - { - "args": [ - ], - "name": "STDERR should not match" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:130" + ] }, { + "source": "^a (\\d+) byte file named \"([^\"]*)\" should exist$", "flags": "", - "source": "^STDERR should be$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:272", "steps": [ - { - "args": [ - ], - "name": "STDERR should be" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:134" + ] }, { + "source": "^the following directories should exist:$", "flags": "", - "source": "^STDERR should be empty$", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:276", "steps": [ - { - "args": [ - ], - "name": "STDERR should be empty" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:138" + ] + }, + { + "source": "^the following directories should not exist:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:280", + "steps": [ + + ] + }, + { + "source": "^a directory named \"([^\"]*)\" should exist$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:284", + "steps": [ + + ] + }, + { + "source": "^a directory named \"([^\"]*)\" should not exist$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:288", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:292", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should not contain \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:296", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should contain:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:300", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should contain exactly:$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:304", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should match /([^/]*)/$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:308", + "steps": [ + + ] + }, + { + "source": "^the file \"([^\"]*)\" should not match /([^/]*)/$", + "flags": "", + "file_colon_line": "aruba-0.5.1/lib/aruba/cucumber.rb:312", + "steps": [ + + ] }, { + "source": "^I run cucumber \"(.+)\"$", "flags": "", - "source": "^\"([^\"]*)\" should exist$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:1", "steps": [ { + "name": "I run cucumber \"--format json features/doc_string.feature\"", "args": [ { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml" + "offset": 16, + "val": "--format json features/doc_string.feature" } - ], - "name": "\"fixtures/junit/tmp/TEST-features-one_passing_one_failing.xml\" should exist" + ] }, { + "name": "I run cucumber \"--format json features/one_passing_one_failing.feature\"", "args": [ { - "offset": 1, - "val": "fixtures/junit/tmp/TEST-features-pending.xml" + "offset": 16, + "val": "--format json features/one_passing_one_failing.feature" } - ], - "name": "\"fixtures/junit/tmp/TEST-features-pending.xml\" should exist" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:142" - }, - { - "flags": "", - "source": "^\"([^\"]*)\" should not be required$", - "steps": [ + ] + }, { + "name": "I run cucumber \"-b --format json features/embed.feature\"", "args": [ { - "offset": 1, - "val": "features/step_definitions/foof.rb" + "offset": 16, + "val": "-b --format json features/embed.feature" } - ], - "name": "\"features/step_definitions/foof.rb\" should not be required" + ] }, { + "name": "I run cucumber \"features/f.feature --format Jb::Formatter\"", "args": [ { - "offset": 1, - "val": "features/step_definitions/fooz.rb" + "offset": 16, + "val": "features/f.feature --format Jb::Formatter" } - ], - "name": "\"features/step_definitions/fooz.rb\" should not be required" + ] }, { + "name": "I run cucumber \"features/f.feature --format Ze::Formator\"", "args": [ { - "offset": 1, - "val": "features/support/dont_require_me.rb" + "offset": 16, + "val": "features/f.feature --format Ze::Formator" } - ], - "name": "\"features/support/dont_require_me.rb\" should not be required" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:147" - }, - { - "flags": "", - "source": "^\"([^\"]*)\" should be required$", - "steps": [ + ] + }, { + "name": "I run cucumber \"features/f.feature --format debug --expand\"", "args": [ { - "offset": 1, - "val": "features/step_definitions/foot.rb" + "offset": 16, + "val": "features/f.feature --format debug --expand" } - ], - "name": "\"features/step_definitions/foot.rb\" should be required" + ] }, { + "name": "I run cucumber \"features/f.feature --format debug\"", "args": [ { - "offset": 1, - "val": "features/support/require_me.rb" + "offset": 16, + "val": "features/f.feature --format debug" } - ], - "name": "\"features/support/require_me.rb\" should be required" - } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:151" - }, - { - "flags": "", - "source": "^exactly these files should be loaded:\\s*(.*)$", - "steps": [ + ] + }, + { + "name": "I run cucumber \"features/foo.feature\"", + "args": [ + { + "offset": 16, + "val": "features/foo.feature" + } + ] + }, + { + "name": "I run cucumber \"features/one_passing_one_failing.feature -r features -f rerun\"", + "args": [ + { + "offset": 16, + "val": "features/one_passing_one_failing.feature -r features -f rerun" + } + ] + }, { + "name": "I run cucumber \"features/sample.feature --tags ~@wip\"", "args": [ { - "offset": 38, - "val": "features/support/env.rb" + "offset": 16, + "val": "features/sample.feature --tags ~@wip" } - ], - "name": "exactly these files should be loaded: features/support/env.rb" + ] }, { + "name": "I run cucumber \"features/sample.feature -r features --tags ~@wip\"", "args": [ { - "offset": 38, - "val": "features/support/env.rb, features/support/super_env.rb" + "offset": 16, + "val": "features/sample.feature -r features --tags ~@wip" } - ], - "name": "exactly these files should be loaded: features/support/env.rb, features/support/super_env.rb" + ] }, { + "name": "I run cucumber \"features/scenario_outline_with_undefined_steps.feature --format html --expand \"", "args": [ { - "offset": 38, - "val": "features/support/super_env.rb" + "offset": 16, + "val": "features/scenario_outline_with_undefined_steps.feature --format html --expand " } - ], - "name": "exactly these files should be loaded: features/support/super_env.rb" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:155" + ] }, { + "source": "^it\\ should\\ pass$", "flags": "", - "source": "^exactly these features should be ran:\\s*(.*)$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:5", "steps": [ { + "name": "it should pass", "args": [ - { - "offset": 38, - "val": "features/another.feature" - } - ], - "name": "exactly these features should be ran: features/another.feature" + + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:159" + ] }, { + "source": "^it should (pass|fail) with JSON:$", "flags": "", - "source": "^the (.*) profile should be used$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:9", "steps": [ { + "name": "it should fail with JSON:", + "args": [ + { + "offset": 10, + "val": "fail" + } + ] + }, + { + "name": "it should pass with JSON:", "args": [ { - "offset": 4, - "val": "default" + "offset": 10, + "val": "pass" } - ], - "name": "the default profile should be used" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:163" - }, - { - "flags": "", - "source": "^print output$", - "steps": [ - - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:167" + ] }, { + "source": "^a directory without standard Cucumber project directory structure$", "flags": "", - "source": "^the output should contain the following JSON:$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:23", "steps": [ { + "name": "a directory without standard Cucumber project directory structure", "args": [ - ], - "name": "the output should contain the following JSON:" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/cucumber_steps.rb:171" + ] }, { + "source": "^a scenario with a step that looks like this:$", "flags": "", - "source": "^missing$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:29", "steps": [ + { + "name": "a scenario with a step that looks like this:", + "args": [ - ], - "file_colon_line": "legacy_features/step_definitions/extra_steps.rb:1" + ] + } + ] }, { + "source": "^a step definition that looks like this:$", "flags": "", - "source": "^this step works$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:35", "steps": [ { + "name": "a step definition that looks like this:", "args": [ - ], - "name": "this step works" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/simplest_steps.rb:1" + ] }, { + "source": "^I run the feature with the (\\w+) formatter$", "flags": "", - "source": "^there is a wire server (running |)on port (\\d+) which understands the following protocol:$", + "file_colon_line": "features/step_definitions/cucumber_steps.rb:39", "steps": [ { + "name": "I run the feature with the progress formatter", "args": [ { - "offset": 23, - "val": "" - }, - { - "offset": 31, - "val": "54321" - } - ], - "name": "there is a wire server on port 54321 which understands the following protocol:" - }, - { - "args": [ - { - "offset": 23, - "val": "running " - }, - { - "offset": 39, - "val": "12345" + "offset": 27, + "val": "progress" } - ], - "name": "there is a wire server running on port 12345 which understands the following protocol:" - }, + ] + } + ] + }, + { + "source": "^I am running spork in the background$", + "flags": "", + "file_colon_line": "features/step_definitions/drb_steps.rb:1", + "steps": [ { + "name": "I am running spork in the background", "args": [ - { - "offset": 23, - "val": "running " - }, - { - "offset": 39, - "val": "16816" - } - ], - "name": "there is a wire server running on port 16816 which understands the following protocol:" - }, + + ] + } + ] + }, + { + "source": "^jeg drikker en \"([^\"]*)\"$", + "flags": "", + "file_colon_line": "features/step_definitions/iso-8859-1_steps.rb:6", + "steps": [ { + "name": "jeg drikker en \"øl\"", "args": [ { - "offset": 23, - "val": "running " - }, - { - "offset": 39, - "val": "54321" + "offset": 16, + "val": "øl" } - ], - "name": "there is a wire server running on port 54321 which understands the following protocol:" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/wire_steps.rb:1" + ] }, { + "source": "^skal de andre si \"([^\"]*)\"$", "flags": "", - "source": "^the wire server takes (.*) seconds to respond to the invoke message$", + "file_colon_line": "features/step_definitions/iso-8859-1_steps.rb:10", "steps": [ { + "name": "skal de andre si \"skål\"", "args": [ { - "offset": 22, - "val": "0.2" + "offset": 18, + "val": "skål" } - ], - "name": "the wire server takes 0.2 seconds to respond to the invoke message" + ] } - ], - "file_colon_line": "legacy_features/step_definitions/wire_steps.rb:8" + ] } ] \ No newline at end of file diff --git a/fixtures/self_test/features/support/env.rb b/fixtures/self_test/features/support/env.rb index 1ce0d3adaf..7ce863f2ce 100644 --- a/fixtures/self_test/features/support/env.rb +++ b/fixtures/self_test/features/support/env.rb @@ -1,6 +1,6 @@ require 'base64' begin require 'rspec/expectations'; rescue LoadError; require 'spec/expectations'; end -$KCODE = 'u' unless Cucumber::RUBY_1_9 +$KCODE = 'u' if Cucumber::RUBY_1_8_7 Before('@not_used') do raise "Should never run" diff --git a/gem_tasks/cucumber.rake b/gem_tasks/cucumber.rake index 2789906231..8bcfc82cc9 100644 --- a/gem_tasks/cucumber.rake +++ b/gem_tasks/cucumber.rake @@ -3,12 +3,14 @@ require 'cucumber/platform' class Cucumber::Rake::Task def set_profile_for_current_ruby - self.profile = if(Cucumber::JRUBY) + self.profile = if Cucumber::JRUBY Cucumber::WINDOWS ? 'jruby_win' : 'jruby' - elsif(Cucumber::WINDOWS_MRI) + elsif Cucumber::WINDOWS_MRI 'windows_mri' - elsif(Cucumber::RUBY_1_9) + elsif Cucumber::RUBY_1_9 'ruby_1_9' + elsif Cucumber::RUBY_2_0 + 'ruby_2_0' end end end diff --git a/legacy_features/support/env.rb b/legacy_features/support/env.rb index 8a3d8481fa..a70afef19e 100644 --- a/legacy_features/support/env.rb +++ b/legacy_features/support/env.rb @@ -101,7 +101,7 @@ def run(command) stderr_file = Tempfile.new('cucumber') stderr_file.close in_current_dir do - mode = Cucumber::RUBY_1_9 ? {:external_encoding=>"UTF-8"} : 'r' + mode = Cucumber::RUBY_1_8_7 ? 'r' : {:external_encoding=>"UTF-8"} IO.popen("#{command} 2> #{stderr_file.path}", mode) do |io| @last_stdout = io.read end diff --git a/lib/cucumber/core_ext/instance_exec.rb b/lib/cucumber/core_ext/instance_exec.rb index 031982fd8b..9aa446825f 100644 --- a/lib/cucumber/core_ext/instance_exec.rb +++ b/lib/cucumber/core_ext/instance_exec.rb @@ -54,7 +54,7 @@ def cucumber_instance_exec(check_arity, pseudo_method, *args, &block) def cucumber_arity(block) a = block.arity - Cucumber::RUBY_1_9 ? a : (a == -1 ? 0 : a) + Cucumber::RUBY_1_8_7 ? (a == -1 ? 0 : a) : a end def cucumber_compatible_arity?(args, block) @@ -74,7 +74,7 @@ def cucumber_run_with_backtrace_filtering(pseudo_method) end end - INSTANCE_EXEC_OFFSET = (Cucumber::RUBY_1_9 || Cucumber::RUBY_1_8_7 || Cucumber::JRUBY) ? -3 : -4 + INSTANCE_EXEC_OFFSET = (Cucumber::RUBY_2_0 || Cucumber::RUBY_1_9 || Cucumber::RUBY_1_8_7 || Cucumber::JRUBY) ? -3 : -4 def replace_instance_exec_invocation_line!(backtrace, instance_exec_invocation_line, pseudo_method) return if Cucumber.use_full_backtrace diff --git a/lib/cucumber/formatter/unicode.rb b/lib/cucumber/formatter/unicode.rb index 61feaaa5f2..ca2b4c50a4 100644 --- a/lib/cucumber/formatter/unicode.rb +++ b/lib/cucumber/formatter/unicode.rb @@ -2,10 +2,10 @@ # Tips for improvement - esp. ruby 1.9: http://www.ruby-forum.com/topic/184730 require 'cucumber/platform' require 'cucumber/formatter/ansicolor' -$KCODE='u' unless Cucumber::RUBY_1_9 +$KCODE='u' if Cucumber::RUBY_1_8_7 if Cucumber::WINDOWS - require 'iconv' unless Cucumber::RUBY_1_9 + require 'iconv' if Cucumber::RUBY_2_0 if ENV['CUCUMBER_OUTPUT_ENCODING'] Cucumber::CODEPAGE = ENV['CUCUMBER_OUTPUT_ENCODING'] @@ -27,14 +27,7 @@ def self.extended(o) o.instance_eval do alias cucumber_print print def print(*a) - if Cucumber::RUBY_1_9 - begin - cucumber_print(*a.map{|arg| arg.to_s.encode(Encoding.default_external)}) - rescue Encoding::UndefinedConversionError => e - STDERR.cucumber_puts("WARNING: #{e.message}") - cucumber_print(*a) - end - else + if Cucumber::RUBY_1_8_7 begin cucumber_print(*Iconv.iconv(Cucumber::CODEPAGE, "UTF-8", *a.map{|a|a.to_s})) rescue Iconv::InvalidEncoding => e @@ -44,19 +37,19 @@ def print(*a) STDERR.cucumber_puts("WARNING: #{e.message}") cucumber_print(*a) end + else + begin + cucumber_print(*a.map{|arg| arg.to_s.encode(Encoding.default_external)}) + rescue Encoding::UndefinedConversionError => e + STDERR.cucumber_puts("WARNING: #{e.message}") + cucumber_print(*a) + end end end alias cucumber_puts puts def puts(*a) - if Cucumber::RUBY_1_9 - begin - cucumber_puts(*a.map{|arg| arg.to_s.encode(Encoding.default_external)}) - rescue Encoding::UndefinedConversionError => e - STDERR.cucumber_puts("WARNING: #{e.message}") - cucumber_puts(*a) - end - else + if Cucumber::RUBY_1_8_7 begin cucumber_puts(*Iconv.iconv(Cucumber::CODEPAGE, "UTF-8", *a.map{|a|a.to_s})) rescue Iconv::InvalidEncoding => e @@ -66,6 +59,13 @@ def puts(*a) STDERR.cucumber_puts("WARNING: #{e.message}") cucumber_puts(*a) end + else + begin + cucumber_puts(*a.map{|arg| arg.to_s.encode(Encoding.default_external)}) + rescue Encoding::UndefinedConversionError => e + STDERR.cucumber_puts("WARNING: #{e.message}") + cucumber_puts(*a) + end end end end diff --git a/lib/cucumber/platform.rb b/lib/cucumber/platform.rb index 41f15c43a0..7b3f532c3d 100644 --- a/lib/cucumber/platform.rb +++ b/lib/cucumber/platform.rb @@ -14,6 +14,7 @@ module Cucumber WINDOWS_MRI = WINDOWS && !JRUBY && !IRONRUBY RAILS = defined?(Rails) RUBY_BINARY = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['ruby_install_name']) + RUBY_2_0 = RUBY_VERSION =~ /^2\.0/ RUBY_1_9 = RUBY_VERSION =~ /^1\.9/ RUBY_1_8_7 = RUBY_VERSION =~ /^1\.8\.7/ @@ -21,7 +22,7 @@ class << self attr_accessor :use_full_backtrace def file_mode(m, encoding="UTF-8") #:nodoc: - RUBY_1_9 ? "#{m}:#{encoding}" : m + RUBY_1_8_7 ? m : "#{m}:#{encoding}" end end self.use_full_backtrace = false diff --git a/lib/cucumber/rake/task.rb b/lib/cucumber/rake/task.rb index bbc851f1bf..6a7e1e010b 100644 --- a/lib/cucumber/rake/task.rb +++ b/lib/cucumber/rake/task.rb @@ -143,7 +143,7 @@ def cucumber_opts=(opts) #:nodoc: # true, +fork+ is implicit. attr_accessor :rcov def rcov=(flag) - if(flag && Cucumber::RUBY_1_9) + if flag && !Cucumber::RUBY_1_8_7 raise failed + "RCov only works on Ruby 1.8.x. You may want to use SimpleCov: https://github.com/colszowka/simplecov" + reset end @rcov = flag diff --git a/spec/cucumber/cli/configuration_spec.rb b/spec/cucumber/cli/configuration_spec.rb index 55b27bb63f..710c463ab5 100644 --- a/spec/cucumber/cli/configuration_spec.rb +++ b/spec/cucumber/cli/configuration_spec.rb @@ -8,9 +8,13 @@ module ExposesOptions attr_reader :options end + def convert_hash_to_yaml_erb(hash) + ["---", *hash.map { |k,v| "#{k}: #{v}" }].join "\n" + end + def given_cucumber_yml_defined_as(hash_or_string) File.stub!(:exist?).and_return(true) - cucumber_yml = hash_or_string.is_a?(Hash) ? hash_or_string.to_yaml : hash_or_string + cucumber_yml = hash_or_string.is_a?(Hash) ? convert_hash_to_yaml_erb(hash_or_string) : hash_or_string IO.stub!(:read).with('cucumber.yml').and_return(cucumber_yml) end diff --git a/spec/cucumber/core_ext/proc_spec.rb b/spec/cucumber/core_ext/proc_spec.rb index daa16df33d..5f912a0a42 100644 --- a/spec/cucumber/core_ext/proc_spec.rb +++ b/spec/cucumber/core_ext/proc_spec.rb @@ -35,20 +35,20 @@ }.should raise_error(Cucumber::ArityMismatchError, "Your block takes 2 arguments, but the Regexp matched 1 argument.") end - if Cucumber::RUBY_1_9 - it "should allow varargs (expecting 0+)" do + if Cucumber::RUBY_1_8_7 + # Ruby 1.8 + it "should not allow varargs 0+ because Ruby 1.8 reports same arity as with no args, so we can't really tell the difference." do lambda { Object.new.cucumber_instance_exec(true, 'foo', 1) do |*args| end - }.should_not raise_error(Cucumber::ArityMismatchError) + }.should raise_error(Cucumber::ArityMismatchError, "Your block takes 0 arguments, but the Regexp matched 1 argument.") end else - # Ruby 1.8 - it "should not allow varargs 0+ because Ruby 1.8 reports same arity as with no args, so we can't really tell the difference." do + it "should allow varargs (expecting 0+)" do lambda { Object.new.cucumber_instance_exec(true, 'foo', 1) do |*args| end - }.should raise_error(Cucumber::ArityMismatchError, "Your block takes 0 arguments, but the Regexp matched 1 argument.") + }.should_not raise_error(Cucumber::ArityMismatchError) end end diff --git a/spec/cucumber/step_match_spec.rb b/spec/cucumber/step_match_spec.rb index 18c6f1762d..e4aeb1f830 100644 --- a/spec/cucumber/step_match_spec.rb +++ b/spec/cucumber/step_match_spec.rb @@ -7,7 +7,7 @@ module Cucumber describe StepMatch do include RSpec::WorkInProgress - WORD = Cucumber::RUBY_1_9 ? '[[:word:]]' : '\w' + WORD = Cucumber::RUBY_1_8_7 ? '\w' : '[[:word:]]' before do @rb_language = RbSupport::RbLanguage.new(nil) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 38efd948dc..95d16d8c9f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -13,7 +13,7 @@ Bundler.setup require 'cucumber' -$KCODE='u' unless Cucumber::RUBY_1_9 +$KCODE='u' if Cucumber::RUBY_1_8_7 RSpec.configure do |c| c.before do