Class: Webspicy::Web::Specification::Pre::RobustToInvalidInput

Inherits:
Object
  • Object
show all
Includes:
Webspicy::Web::Specification::Pre
Defined in:
lib/webspicy/web/specification/pre/robust_to_invalid_input.rb

Constant Summary

Constants included from Specification::Condition

Specification::Condition::MATCH_ALL

Instance Attribute Summary

Attributes included from Specification::Condition

#matching_description, #tester

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Specification::Pre

#contribute_to_openapi_verb, #instrument

Methods included from Specification::Condition

#bind, #fail!, #sooner_or_later, #to_s

Class Method Details

.match(service, pre) ⇒ Object



8
9
10
# File 'lib/webspicy/web/specification/pre/robust_to_invalid_input.rb', line 8

def self.match(service, pre)
  self.new
end

Instance Method Details

#counterexamples(service) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/webspicy/web/specification/pre/robust_to_invalid_input.rb', line 16

def counterexamples(service)
  spec = service.specification
  first = service.examples.first
  cexamples = []
  cexamples += url_randomness_counterexamples(service, first) if first
  cexamples += empty_input_counterexamples(service, first) if first
  cexamples
end

#match(service, pre) ⇒ Object



12
13
14
# File 'lib/webspicy/web/specification/pre/robust_to_invalid_input.rb', line 12

def match(service, pre)
  self
end