Skip to content

Commit 74fdbca

Browse files
committed
Warn if with_them is used before where is defined
1 parent 572137c commit 74fdbca

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/rspec/parameterized/core.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ def with_them(*args, &b)
7979
@parameter ||= nil
8080

8181
if @parameter.nil?
82+
warn "#{b&.source_location&.join(':') || caller[0]}: `where` not defined."
83+
8284
@parameterized_pending_cases ||= []
8385
@parameterized_pending_cases << [args, b]
8486
else

0 commit comments

Comments
 (0)