File: REPORT_TEMPLATE.md

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 (43 lines) | stat: -rw-r--r-- 1,103 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
37
38
39
40
41
42
43
<!---
This file was generated on 2023-04-16T20:53:24+01:00 from the rspec-dev repo.
DO NOT modify it by hand as your changes will get lost the next time it is generated.
-->

# Report template

```ruby
# frozen_string_literal: true

begin
  require "bundler/inline"
rescue LoadError => e
  $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
  raise e
end

gemfile(true) do
  source "https://rubygems.org"

  gem "rspec", "3.7.0" # Activate the gem and version you are reporting the issue against.
end

puts "Ruby version is: #{RUBY_VERSION}"
require 'rspec/autorun'

RSpec.describe 'additions' do
  it 'returns 2' do
    expect(1 + 1).to eq(2)
  end

  it 'returns 1' do
    expect(3 - 1).to eq(-1)
  end
end
```

Simply copy the content of the appropriate template into a `.rb` file on your computer
and make the necessary changes to demonstrate the issue. You can execute it by running
`ruby rspec_report.rb` in your terminal.

You can then share your executable test case as a [gist](https://gist.github.com), or
simply paste the content into the issue description.