Class: RSpec::Raml::Matchers::MatchRamlStatus

Inherits:
Abstract
  • Object
show all
Defined in:
lib/rspec/raml/matchers/match_raml_status.rb

Instance Attribute Summary

Attributes inherited from Abstract

#raml, #response, #status, #url, #verb

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, #matches?

Constructor Details

This class inherits a constructor from RSpec::Raml::Matchers::Abstract

Instance Method Details

#descriptionObject



7
8
9
# File 'lib/rspec/raml/matchers/match_raml_status.rb', line 7

def description
  'match RAML status'
end

#failure_messageObject



11
12
13
# File 'lib/rspec/raml/matchers/match_raml_status.rb', line 11

def failure_message
  "expected the response to have a #{raml.name} status code, but got #{response.status}"
end

#failure_message_when_negatedObject



15
16
17
# File 'lib/rspec/raml/matchers/match_raml_status.rb', line 15

def failure_message_when_negated
  "expected the response not to have status: #{raml.name}"
end