We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c267987 commit d04a66eCopy full SHA for d04a66e
spec/support/core_helpers.rb
@@ -75,9 +75,19 @@ def skip_unless_integration_testing_enabled
75
# work on Ruby 2.5/2.6 and 2.7+. In practice only one type of arguments
76
# should be used in any given call.
77
def with_env(*args, **opts)
78
+ if args.any? && opts.any?
79
+ raise ArgumentError, 'Do not pass both args and opts'
80
+ end
81
+
82
around do |example|
- ClimateControl.modify(*args, **opts) do
- example.run
83
+ if args.any?
84
+ ClimateControl.modify(*args) do
85
+ example.run
86
87
+ else
88
+ ClimateControl.modify(**opts) do
89
90
91
end
92
93
0 commit comments