You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Move the `Money.default_infinite_precision` test setup from a shared
context into global, conditional RSpec hooks.
The previous `shared_context` approach, which relied on implicit
metadata inclusion, is deprecated and was failing with the modern
`shared_context_metadata_behavior = :apply_to_host_groups` setting.
An explicit `include_context` is unsuitable because this behavior is
sometimes required for individual examples (`it` blocks), where
contexts cannot be included.
This commit defines global `before` and `after` hooks in the RSpec
configuration that are filtered by the
`:default_infinite_precision_true` metadata tag. This provides a
declarative and efficient way to apply the necessary setup and teardown
to any example group or individual example without repetitive code,
while aligning with modern RSpec practices.
Close#1136
0 commit comments