Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

rspec-queue does not fail if there are NameErrors in specs

Open
#100 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
ruby
Domain
cli, testing-qa

Research direction

Start with ruby/lib/rspec/queue.rb around lines 387-401 and reproduce the NameError case using rspec-queue, comparing its exit status with bare rspec. Trace how NameError and syntax errors affect the reported result and determine whether the completed behavior should return a non-zero status without breaking retries; done means regression coverage and correct failure status.

Written by the indexing model from the issue text.

Description

I've just encountered the following behaviour with the rspec runner of ci-queue:

  1. Modify a spec to reference an uninitialized constant so as to trigger a NameError, e.g. by referring to a non-existent class:
describe MyNonExistentClass do
 ...
end
  1. Run rspec-queue
  2. rspec-queue exits successfully.

I guessed wrongly that rspec-queue would fail with a non-zero exit code, but it exited with 0.

Bare rspec exits with 1 in the above situation.

I'm wondering if this is intended behaviour - perhaps its needed for retries to work?

The error message output is:

NameError: uninitialized constant MyNonExistentClass

Debugging shows that line 400 is where the 0 exit code is returned, because the NameError causes @world.non_example_failure to be true. Syntax errors appear to have the same result:

https://github.com/Shopify/ci-queue/blob/cba2cddb6de4342fc7b5dd911f53d99651e3723e/ruby/lib/rspec/queue.rb#L387-L401

Dominant language
Ruby
Stars
240
Forks
36
Avg merge
28m
Merged PRs (30d)
3

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/ci-queue

All issues in Shopify/ci-queue

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.