Skip to content

Use RSpec example block argument instead of the global RSpec.current_example. This allows to run tests with the async-rspec gem.#153

Merged
ArturT merged 5 commits intomasterfrom
rspec-current-example-group
Aug 5, 2021
Merged

Use RSpec example block argument instead of the global RSpec.current_example. This allows to run tests with the async-rspec gem.#153
ArturT merged 5 commits intomasterfrom
rspec-current-example-group

Conversation

@ArturT
Copy link
Copy Markdown
Member

@ArturT ArturT commented Jul 30, 2021

  • Use RSpec example from RSpec each hook instead of global RSpec.current_example. It allows running tests with async-rspec gem.
  • breaking change: drop support for RSpec 2.x. It was already accidentally dropped due to added context RSpec hooks.

Related

This PR is based on changes from knapsack gem:
KnapsackPro/knapsack#117

@ArturT ArturT requested a review from shadre July 30, 2021 14:46
Comment thread CHANGELOG.md
@@ -1,5 +1,14 @@
# Change Log

### 3.0.0
Copy link
Copy Markdown
Member

@shadre shadre Aug 3, 2021

Choose a reason for hiding this comment

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

Lingo suggestions:

  • the RSpec `context` hook, which is available only since RSpec 3.x
  • Use RSpec `example` block argument instead of the global `RSpec.current_example`. This allows to run tests with the `async-rspec` gem.

Copy link
Copy Markdown
Member

@shadre shadre left a comment

Choose a reason for hiding this comment

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

added lingo suggestions

@ArturT ArturT changed the title Use RSpec example from RSpec each hook instead of global RSpec.current_example. It allows running tests with async-rspec gem. Use RSpec example block argument instead of the global RSpec.current_example. This allows to run tests with the async-rspec gem. Aug 5, 2021
@ArturT ArturT merged commit a08e6e0 into master Aug 5, 2021
@ArturT ArturT deleted the rspec-current-example-group branch August 5, 2021 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants