Module: Warden::Test::Mock
- Defined in:
- lib/warden/test/mock.rb
Overview
A mock of an application to get a Warden object to test on Note: During the teardown phase of your specs you should include: Warden.test_reset!
Defined Under Namespace
Classes: Session
Class Method Summary collapse
Instance Method Summary collapse
-
#warden ⇒ Object
A helper method that provides the warden object by mocking the env variable.
Class Method Details
.included(_base) ⇒ Object
11 12 13 |
# File 'lib/warden/test/mock.rb', line 11 def self.included(_base) ::Warden.test_mode! end |
Instance Method Details
#warden ⇒ Object
A helper method that provides the warden object by mocking the env variable.
17 18 19 20 21 |
# File 'lib/warden/test/mock.rb', line 17 def warden @warden ||= begin env['warden'] end end |