lib/janus/test_helper.rb in janus-0.6.0 vs lib/janus/test_helper.rb in janus-0.7.0
- old
+ new
@@ -8,11 +8,15 @@
def sign_in(user, options = {})
@janus.login(user, options)
end
- def sign_out(user_or_scope)
- @janus.logout(Janus.scope_for(user_or_scope))
+ def sign_out(user_or_scope = nil)
+ if user_or_scope
+ @janus.logout(Janus.scope_for(user_or_scope))
+ else
+ @janus.logout
+ end
end
def assert_authenticated(scope)
assert @janus.authenticated?(scope), "Expected #{scope} to be authenticated."
end