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



207
208
209
# File 'lib/audited/rspec_matchers.rb', line 207

def description
  "has associated audits"
end

#failure_messageObject



197
198
199
# File 'lib/audited/rspec_matchers.rb', line 197

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

#matches?(subject) ⇒ Boolean

Returns:

  • (Boolean)


191
192
193
194
195
# File 'lib/audited/rspec_matchers.rb', line 191

def matches?(subject)
  @subject = subject

  association_exists?
end

#negative_failure_messageObject Also known as: failure_message_when_negated



201
202
203
# File 'lib/audited/rspec_matchers.rb', line 201

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