Class: Professionalnerd::SimplePrivateMessages::Shoulda::Matchers::HavePrivateMessagesMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/simple-private-messages/matchers/have_private_messages_matcher.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#descriptionObject



26
27
28
# File 'lib/simple-private-messages/matchers/have_private_messages_matcher.rb', line 26

def description
  "have private messages"
end

#failure_messageObject



18
19
20
# File 'lib/simple-private-messages/matchers/have_private_messages_matcher.rb', line 18

def failure_message
  "Should have 'has_private_messages' method"
end

#matches?(subject) ⇒ Boolean



12
13
14
15
16
# File 'lib/simple-private-messages/matchers/have_private_messages_matcher.rb', line 12

def matches? subject
  @subject = subject
  @subject = @subject.class unless Class === @subject
  included?
end

#negative_failure_messageObject



22
23
24
# File 'lib/simple-private-messages/matchers/have_private_messages_matcher.rb', line 22

def negative_failure_message
  "Should not have 'has_private_messages' method"
end