File: backtraces.feature

package info (click to toggle)
cucumber 1.3.17-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 3,296 kB
  • ctags: 1,812
  • sloc: ruby: 13,576; python: 28; sh: 10; makefile: 10; tcl: 3
file content (36 lines) | stat: -rw-r--r-- 1,004 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
Feature: Backtraces
  In order to discover errors quickly
  As a cuker
  I want to see backtraces for failures

  Background:
    Given a file named "features/failing_hard.feature" with:
      """
      Feature: Sample
        Scenario: Example
          Given failing
      """

  @jruby
  Scenario: Backtraces enabled
    Given a file named "features/step_definitions/steps.rb" with:
      """
      require 'java'
      java_import 'java.util.Collections'

      Given /^failing$/ do
        Collections.empty_list.add 1
      end
      """
    When I run `cucumber features/failing_hard.feature`
    Then it should fail with:
      """
      Feature: Sample

        Scenario: Example # features/failing_hard.feature:2
          Given failing   # features/step_definitions/steps.rb:4
             (Java::JavaLang::UnsupportedOperationException)
            java.util.AbstractList.add(java/util/AbstractList.java:148)
            java.util.AbstractList.add(java/util/AbstractList.java:108)
      """