module Rspec::ApiHelpers

Attributes

adapter[RW]

Public Class Methods

included(receiver) click to toggle source
# File lib/rspec/api_helpers.rb, line 13
def self.included(receiver)
  receiver.extend         ExampleGroupMethods
  receiver.send :include, ExampleMethods
end
with(adapter:) click to toggle source
# File lib/rspec/api_helpers.rb, line 18
def self.with(adapter:)
  if adapter.is_a?(Class)
    self.adapter = adapter
  else
    case adapter.to_s.to_sym
    when :active_model
      self.adapter = Adapter::ActiveModel
    when :json_api
      self.adapter = Adapter::JsonApi
    end
  end

  return self
end