Skip to content

Commit 79e275c

Browse files
authored
Merge pull request Shopify#338 from Shopify/type-activesupport-assert-changes
Add signature for assert_changes method
2 parents ef942e5 + 1360cd8 commit 79e275c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

rbi/annotations/activesupport.rbi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,4 +594,17 @@ module ActiveSupport::Testing::Assertions
594594
type_parameters(:Block).params(block: T.proc.returns(T.type_parameter(:Block))).returns(T.type_parameter(:Block))
595595
end
596596
def assert_nothing_raised(&block); end
597+
598+
sig do
599+
type_parameters(:TResult)
600+
.params(
601+
expression: T.any(Proc, Kernel),
602+
message: Kernel,
603+
from: T.anything,
604+
to: T.anything,
605+
block: T.proc.returns(T.type_parameter(:TResult)),
606+
)
607+
.returns(T.type_parameter(:TResult))
608+
end
609+
def assert_changes(expression, message = T.unsafe(nil), from: T.unsafe(nil), to: T.unsafe(nil), &block); end
597610
end

0 commit comments

Comments
 (0)