Class: InfinumJsonApiSetup::RSpec::Matchers::HaveResourceCountOf

Inherits:
JsonBodyMatcher
  • Object
show all
Defined in:
lib/infinum_json_api_setup/rspec/matchers/have_resource_count_of.rb

Instance Method Summary collapse

Methods inherited from JsonBodyMatcher

#failure_message, #matches?

Constructor Details

#initialize(expected_count) ⇒ HaveResourceCountOf

Returns a new instance of HaveResourceCountOf.

Parameters:

  • expected_count (Integer)


12
13
14
15
16
# File 'lib/infinum_json_api_setup/rspec/matchers/have_resource_count_of.rb', line 12

def initialize(expected_count)
  super(Matchers::Util::BodyParser.new('data'))

  @expected_count = expected_count
end