Class: MuckEngine::Controllers::Matchers::RequireLoginMatcher
- Inherits:
-
Object
- Object
- MuckEngine::Controllers::Matchers::RequireLoginMatcher
- Defined in:
- lib/muck-engine/test/controllers/matchers/login_matcher.rb
Instance Method Summary collapse
- #description ⇒ Object
- #failure_message ⇒ Object
-
#initialize(action, verb, login_url, context) ⇒ RequireLoginMatcher
constructor
A new instance of RequireLoginMatcher.
- #matches?(controller) ⇒ Boolean
Constructor Details
#initialize(action, verb, login_url, context) ⇒ RequireLoginMatcher
Returns a new instance of RequireLoginMatcher.
19 20 21 22 23 24 |
# File 'lib/muck-engine/test/controllers/matchers/login_matcher.rb', line 19 def initialize(action, verb, login_url, context) @action = action @verb = verb @login_url = login_url @context = context end |
Instance Method Details
#description ⇒ Object
35 36 37 |
# File 'lib/muck-engine/test/controllers/matchers/login_matcher.rb', line 35 def description "require login #{@action}" end |
#failure_message ⇒ Object
31 32 33 |
# File 'lib/muck-engine/test/controllers/matchers/login_matcher.rb', line 31 def "Expected a #{@action} to #{@action} to require login" end |
#matches?(controller) ⇒ Boolean
26 27 28 29 |
# File 'lib/muck-engine/test/controllers/matchers/login_matcher.rb', line 26 def matches?(controller) @controller = controller requires_login? end |