Class: RSpecApi::Matchers::Collection::Matcher

Inherits:
Json::Matcher show all
Defined in:
lib/rspec-api/matchers/collection/matcher.rb

Direct Known Subclasses

Filter::Matcher, Sort::Matcher

Instance Attribute Summary

Attributes inherited from Response::Matcher

#response

Instance Method Summary collapse

Methods inherited from Response::Matcher

#failure_message_for_should, #failure_message_for_should_not

Instance Method Details

#descriptionObject



13
14
15
# File 'lib/rspec-api/matchers/collection/matcher.rb', line 13

def description
  %Q(be a collection)
end

#matches?(response) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
# File 'lib/rspec-api/matchers/collection/matcher.rb', line 8

def matches?(response)
  super
  json.is_a? Array
end