Module: Rswag::Specs::ExampleHelpers
- Defined in:
- lib/rswag/specs/example_helpers.rb
Instance Method Summary collapse
Instance Method Details
#assert_response_matches_metadata(metadata) ⇒ Object
29 30 31 |
# File 'lib/rswag/specs/example_helpers.rb', line 29 def () ResponseValidator.new.validate!(, response) end |
#submit_request(metadata) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rswag/specs/example_helpers.rb', line 9 def submit_request() request = RequestFactory.new.build_request(, self) if RAILS_VERSION < 5 send( request[:verb], request[:path], request[:payload], request[:headers] ) else send( request[:verb], request[:path], params: request[:payload], headers: request[:headers] ) end end |