Skip to content

Commit 78d84c7

Browse files
committed
Save original logic so we can delegate
1 parent 7d1f961 commit 78d84c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/kracken/rspec.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,15 @@ def current_user
4747
Kracken::SpecHelper.current_user
4848
end
4949

50+
alias_method :__original_auth__, :authenticate_user_with_token!
5051
def authenticate_user_with_token!
5152
if current_user
5253
@_auth_info = {
5354
id: current_user.id,
5455
team_ids: current_user.team_ids,
5556
}
5657
else
57-
super
58+
__original_auth__
5859
end
5960
end
6061
end

0 commit comments

Comments
 (0)