You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

raketask.feature 1.2 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. Feature: Raketask
  2. In order to use cucumber's rake task
  3. As a Cuker
  4. I do not want to see rake's backtraces when it fails
  5. Also I want to get zero exit status code when it passes
  6. And non-zero exit status code when it fails
  7. Background:
  8. Given the standard step definitions
  9. Given a file named "features/passing_and_failing.feature" with:
  10. """
  11. Feature: Sample
  12. Scenario: Passing
  13. Given this step passes
  14. Scenario: Failing
  15. Given this step raises an error
  16. """
  17. Given a file named "Rakefile" with:
  18. """
  19. require 'cucumber/rake/task'
  20. $SAMPLE_FEATURE_FILE = 'features/passing_and_failing.feature'
  21. Cucumber::Rake::Task.new(:pass) do |t|
  22. t.cucumber_opts = "#{$SAMPLE_FEATURE_FILE}:3"
  23. end
  24. Cucumber::Rake::Task.new(:fail) do |t|
  25. t.cucumber_opts = "#{$SAMPLE_FEATURE_FILE}:6"
  26. end
  27. """
  28. Scenario: Passing feature
  29. When I run `bundle exec rake pass`
  30. Then the exit status should be 0
  31. Scenario: Failing feature
  32. When I run `bundle exec rake fail`
  33. Then the exit status should be 1
  34. But the output should not contain "rake aborted!"

No Description

Contributors (1)