File: json_formatter.feature

package info (click to toggle)
ruby-rspec 3.13.0c0e0m0s1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,856 kB
  • sloc: ruby: 70,868; sh: 1,423; makefile: 99
file content (30 lines) | stat: -rw-r--r-- 1,052 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
Feature: The JSON formatter

  Scenario: Formatting example names for retry
    Given a file named "various_spec.rb" with:
    """ruby
    RSpec.describe "Various" do
      it "fails" do
        expect("fail").to eq("succeed")
      end

      it "succeeds" do
        expect("succeed").to eq("succeed")
      end

      it "pends"
    end
    """
    When I run `rspec various_spec.rb --format j`
    Then the output should contain all of these:
          |"summary_line":"3 examples, 1 failure, 1 pending"|
          |"examples":[                                     |
          |"description":"fails"                             |
          |"full_description":"Various fails"                |
          |"status":"failed"                                 |
          |"file_path":"./various_spec.rb"                   |
          |"line_number":2                                   |
          |"exception":{                                     |
          |"class":"RSpec::Expectations::ExpectationNotMetError"|

    And the exit status should be 1