Class: Audited::RspecMatchers::AssociatedAuditMatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/audited/rspec_matchers.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#descriptionObject



152
153
154
# File 'lib/audited/rspec_matchers.rb', line 152

def description
  "has associated audits"
end

#failure_messageObject



144
145
146
# File 'lib/audited/rspec_matchers.rb', line 144

def failure_message
  "Expected #{model_class} to have associated audits"
end

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


138
139
140
141
142
# File 'lib/audited/rspec_matchers.rb', line 138

def matches?(subject)
  @subject = subject

  association_exists?
end

#negative_failure_messageObject



148
149
150
# File 'lib/audited/rspec_matchers.rb', line 148

def negative_failure_message
  "Expected #{model_class} to not have associated audits"
end