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

- (Object) description



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

def description
  "have private messages"
end

- (Object) failure_message



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

- (Boolean) matches?(subject)

Returns:

  • (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

- (Object) negative_failure_message



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