Skip to content

Instantly share code, notes, and snippets.

View rdnewman's full-sized avatar

Richard Newman rdnewman

  • Newman Works, LLC
  • Idaho
View GitHub Profile
@rdnewman
rdnewman / after_rspec_example.rb
Created August 29, 2020 21:18
Rswag support for multiple examples (could eventually be a complementary gem to rswag)
# /spec/support/documentation/after_rspec_example.rb
# Normally, we'd want to break into multiple files, but then it becomes more to install (unless gemified)
module SomeApp
module Documentation
class AfterRspecExample
def self.apply!(context, example, response)
SwaggerExample::Request.apply!(context, example, response)
SwaggerExample::Response.apply!(context, example, response)
end