Sha256: c9c161f2c7afc1f1d251def2b59febaf959371908d881342b3de438099bf5b86

Contents?: true

Size: 1.03 KB

Versions: 25

Compression:

Stored size: 1.03 KB

Contents

# frozen_string_literal: true

require 'rrj/tools/gem/config'

# :reek:UtilityFunction

module RubyRabbitmqJanus
  # # RRJRSpec
  #
  # Initializer to use with RSpec execution
  class RRJRSpec < RRJTaskAdmin
    # rubocop:disable Lint/MissingSuper
    def initialize
      RubyRabbitmqJanus::Tools::Config.instance
    end
    # rubocop:enable Lint/MissingSuper

    # @see RubyRabbitmqJanus::RRJ::session_endpoint_public
    def session_endpoint_public(_options)
      yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
    end

    # @see RubyRabbitmqJanus::RRJ::session_endpoint_private
    def handle_endpoint_public(_options)
      transaction = RubyRabbitmqJanus::Janus::Transactions::RSpec.new
      yield(transaction)
      transaction.response
    end

    # @see RubyRabbitmqJanus::RRJAdmin::admin_endpoint
    def admin_endpoint(_options)
      yield(RubyRabbitmqJanus::Janus::Transactions::RSpec.new)
    end

    alias session_endpoint_private   session_endpoint_public
    alias handle_endpoint_private    handle_endpoint_public
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
ruby_rabbitmq_janus-3.0.0 lib/rrj/rspec.rb
ruby_rabbitmq_janus-3.0.0.pre.387 lib/rrj/rspec.rb
ruby_rabbitmq_janus-3.0.0.pre.385 lib/rrj/rspec.rb
ruby_rabbitmq_janus-3.0.0.pre.384 lib/rrj/rspec.rb
ruby_rabbitmq_janus-3.0.0.pre.382 lib/rrj/rspec.rb