Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change to improved rspec example selection #1373

Merged
merged 1 commit into from
Apr 30, 2023

Conversation

mbj
Copy link
Owner

@mbj mbj commented Apr 30, 2023

  • Before we'd traverse the entire filtered examples explicitly removing the selection where required.
  • This is inefficient especially on larger example numbers.
  • The new strategy wipes all examples during setup once, and only re-enables selected examples efficiently and targeted.

* Before we'd traverse the entire filtered examples explicitly
  removing the selection where required.
* This is inefficient especially on larger example numbers.
* The new strategy wipes all examples during setup once, and only
  re-enables selected examples efficiently and targeted.
@@ -119,12 +139,6 @@ def all_examples
end
end

def filter_examples(&predicate)
@rspec_world.filtered_examples.each_value do |examples|
Copy link
Owner Author

Choose a reason for hiding this comment

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

Per mutation this was for 99% of the examples resulting in the same result: Clearing the array entirely.

@mbj mbj merged commit eda5ef8 into main Apr 30, 2023
71 checks passed
@mbj mbj deleted the change/to-improved-rspec-test-setup branch April 30, 2023 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant