Module: JsonapiSpec::Matchers

Defined in:
lib/jsonapi_spec/matchers.rb,
lib/jsonapi_spec/matchers/be_valid_jsonapi.rb,
lib/jsonapi_spec/matchers/have_jsonapi_link.rb,
lib/jsonapi_spec/matchers/have_jsonapi_error.rb,
lib/jsonapi_spec/matchers/have_jsonapi_attribute.rb,
lib/jsonapi_spec/matchers/have_jsonapi_relationship.rb

Defined Under Namespace

Classes: BeValidJsonapi, HaveJsonapiAttribute, HaveJsonapiError, HaveJsonapiLink, HaveJsonapiRelationship

Instance Method Summary collapse

Instance Method Details

#be_valid_jsonapiObject



9
10
11
# File 'lib/jsonapi_spec/matchers.rb', line 9

def be_valid_jsonapi
  JsonapiSpec::Matchers::BeValidJsonapi.new
end

#have_jsonapi_attribute(attribute) ⇒ Object



21
22
23
# File 'lib/jsonapi_spec/matchers.rb', line 21

def have_jsonapi_attribute(attribute)
  JsonapiSpec::Matchers::HaveJsonapiAttribute.new(attribute)
end

#have_jsonapi_errorObject



25
26
27
# File 'lib/jsonapi_spec/matchers.rb', line 25

def have_jsonapi_error
  JsonapiSpec::Matchers::HaveJsonapiError.new
end


13
14
15
# File 'lib/jsonapi_spec/matchers.rb', line 13

def have_jsonapi_link(link)
  JsonapiSpec::Matchers::HaveJsonapiLink.new(link)
end

#have_jsonapi_relationship(relationship) ⇒ Object



17
18
19
# File 'lib/jsonapi_spec/matchers.rb', line 17

def have_jsonapi_relationship(relationship)
  JsonapiSpec::Matchers::HaveJsonapiRelationship.new(relationship)
end