class RSpec::Raml::Matchers::NullMatcher
Public Class Methods
new(verb, url, status)
click to toggle source
Calls superclass method
RSpec::Raml::Matchers::Abstract::new
# File lib/rspec/raml/matchers/null_matcher.rb, line 7 def initialize(verb, url, status) super(nil, verb, url, status) end
Public Instance Methods
failure_message()
click to toggle source
# File lib/rspec/raml/matchers/null_matcher.rb, line 11 def failure_message "RAML not found. Here's something to get you started:\n\n#{template}" end
Private Instance Methods
matches_raml?()
click to toggle source
# File lib/rspec/raml/matchers/null_matcher.rb, line 17 def matches_raml? false end
pretty_format(body)
click to toggle source
# File lib/rspec/raml/matchers/null_matcher.rb, line 41 def pretty_format(body) JSON.pretty_generate JSON.parse(body) end
template()
click to toggle source
# File lib/rspec/raml/matchers/null_matcher.rb, line 21 def template { url => { displayName: 'PENDING NAME', verb => { responses: { status => { description: 'PENDING DESCRIPTION', body: { response.content_type => { example: pretty_format(response.body) } } } } } } }.deep_stringify_keys.to_yaml end