Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Allow custom ordering on cli #3025

Merged
merged 4 commits into from
Apr 1, 2023
Merged

Allow custom ordering on cli #3025

merged 4 commits into from
Apr 1, 2023

Conversation

JonRowe
Copy link
Member

@JonRowe JonRowe commented Mar 31, 2023

This PR updates the docs for ordering with some specific examples, adds the ability to defer loading an ordering strategy which in turn enables custom ordering via the cli.

@JonRowe JonRowe force-pushed the allow-custom-ordering-on-cli branch from 2e7a3a3 to c488739 Compare March 31, 2023 10:39
@JonRowe JonRowe force-pushed the allow-custom-ordering-on-cli branch from c488739 to d3efa21 Compare March 31, 2023 11:44
@JonRowe JonRowe requested review from pirj and benoittgt March 31, 2023 12:45
Copy link
Member

@benoittgt benoittgt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice addition. Doc is clear, code is clean. 💯

@JonRowe JonRowe merged commit 004cfff into main Apr 1, 2023
JonRowe added a commit that referenced this pull request Apr 1, 2023
@pirj pirj deleted the allow-custom-ordering-on-cli branch April 14, 2023 08:14
@pirj
Copy link
Member

pirj commented Apr 14, 2023

@JonRowe Do you think this change could be the reason for rspec-rails build failures?

+/home/runner/work/rspec-rails/rspec-core/lib/rspec/core/ordering.rb:100:in `lookup_strategy': Undefined ordering strategy :default (RuntimeError)
+	from /home/runner/work/rspec-rails/rspec-core/lib/rspec/core/ordering.rb:96:in `strategy'
+	from /home/runner/work/rspec-rails/rspec-core/lib/rspec/core/ordering.rb:90:in `order'

@pirj
Copy link
Member

pirj commented Apr 14, 2023

Got it. It's from this line:

When I run `rspec spec --order default --format documentation`

because "default" is not an accepted order.

pirj added a commit to rspec/rspec-rails that referenced this pull request Apr 14, 2023
"default" is not an allowed value, and started failing after rspec/rspec-core#3025
pirj added a commit to rspec/rspec-rails that referenced this pull request Apr 14, 2023
"default" is not an allowed value, and started failing after rspec/rspec-core#3025
pirj added a commit to rspec/rspec-rails that referenced this pull request Apr 14, 2023
"default" is not an allowed value, and started failing after rspec/rspec-core#3025
@JonRowe
Copy link
Member Author

JonRowe commented Feb 4, 2024

Released in 3.13.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants