Module: Janus::TestHelper
- Defined in:
- lib/janus/test_helper.rb
Instance Attribute Summary collapse
-
#janus ⇒ Object
readonly
Returns the value of attribute janus.
Class Method Summary collapse
Instance Method Summary collapse
- #assert_authenticated(scope) ⇒ Object
- #refute_authenticated(scope) ⇒ Object (also: #assert_not_authenticated)
- #sign_in(user, options = {}) ⇒ Object
- #sign_out(user_or_scope = nil) ⇒ Object
Instance Attribute Details
#janus ⇒ Object (readonly)
Returns the value of attribute janus.
3 4 5 |
# File 'lib/janus/test_helper.rb', line 3 def janus @janus end |
Class Method Details
Instance Method Details
#assert_authenticated(scope) ⇒ Object
23 24 25 |
# File 'lib/janus/test_helper.rb', line 23 def assert_authenticated(scope) assert janus.authenticated?(scope), "Expected #{scope} to be authenticated." end |
#refute_authenticated(scope) ⇒ Object Also known as: assert_not_authenticated
27 28 29 |
# File 'lib/janus/test_helper.rb', line 27 def refute_authenticated(scope) refute janus.authenticated?(scope), "Expected #{scope} to not be authenticated." end |
#sign_in(user, options = {}) ⇒ Object
11 12 13 |
# File 'lib/janus/test_helper.rb', line 11 def sign_in(user, = {}) janus.login(user, ) end |