Sha256: 571936de4c03609a1b766eb980491240e048a70fcf417b0403a87fae6ea8be2d

Contents?: true

Size: 547 Bytes

Versions: 4

Compression:

Stored size: 547 Bytes

Contents

module ExternalServices
  module RSpec
    module Configuration
      extend ActiveSupport::Concern

      def add_external_service(name)
        Disabler.add_external_service name
        
        mod = Module.new do
          define_method :"describe_#{name}_api" do |object:, **kwargs, &blk|
            describe_external_service_api(object: object, api_name: name, **kwargs, &blk)
          end
        end

        self.extend mod
      end
    end
  end
end

RSpec::Core::Configuration.send(:include, ExternalServices::RSpec::Configuration)

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
external_services-0.1.4 lib/rspec/configuration.rb
external_services-0.1.3 lib/rspec/configuration.rb
external_services-0.1.2 lib/rspec/configuration.rb
external_services-0.1.1 lib/rspec/configuration.rb