Skip to content

Add "shared." support to ConditionalExtensions#1359

Merged
leonard84 merged 1 commit intospockframework:masterfrom
leonard84:access_to_shared_in_precondition_context
Jul 18, 2021
Merged

Add "shared." support to ConditionalExtensions#1359
leonard84 merged 1 commit intospockframework:masterfrom
leonard84:access_to_shared_in_precondition_context

Conversation

@leonard84
Copy link
Copy Markdown
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
Copy Markdown

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 requested a review from marcphilipp July 17, 2021 17:46
@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.

2 participants