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

Add "shared." support to ConditionalExtensions #1359

Conversation

leonard84
Copy link
Member

ConditionalExtensions can now access shared fields via shared..
If applied on the Specification level, this causes the shared field initializers
and setupSpec methods to run.
If a ConditionalExtension applied on the Specification level uses instance. it
will now behave as if it was applied on every feature.

@codecov
Copy link

codecov bot commented Jul 16, 2021

Codecov Report

Merging #1359 (c97167b) into master (5391db8) will decrease coverage by 0.01%.
The diff coverage is 69.23%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1359      +/-   ##
============================================
- Coverage     79.22%   79.20%   -0.02%     
- Complexity     3943     3949       +6     
============================================
  Files           408      408              
  Lines         12262    12299      +37     
  Branches       1617     1625       +8     
============================================
+ Hits           9714     9741      +27     
- Misses         1967     1975       +8     
- Partials        581      583       +2     
Impacted Files Coverage Δ
...runtime/extension/builtin/PreconditionContext.java 81.81% <60.00%> (+16.60%) ⬆️
...untime/extension/builtin/ConditionalExtension.java 78.20% <70.21%> (-14.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5391db8...c97167b. Read the comment docs.

ConditionalExtensions can now access shared fields via `shared.`.
If applied on the Specification level, this causes the shared field initializers
and `setupSpec` methods to run.
If a ConditionalExtension applied on the Specification level uses `instance.` it
will now behave as if it was applied on every feature.
@leonard84 leonard84 force-pushed the access_to_shared_in_precondition_context branch from ef46e1c to c97167b Compare July 17, 2021 17:45
@leonard84 leonard84 marked this pull request as ready for review July 17, 2021 17:46
@leonard84 leonard84 merged commit 450dc1b into spockframework:master Jul 18, 2021
@leonard84 leonard84 deleted the access_to_shared_in_precondition_context branch July 18, 2021 16:14
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

2 participants