Class: RubyRabbitmqJanus::Janus::Transactions::RSpec

Inherits:
Object
  • Object
show all
Defined in:
lib/rrj/janus/transactions/rspec.rb

Overview

Transaction for RSpec initializer

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeRSpec

Initialize fake object



13
14
15
# File 'lib/rrj/janus/transactions/rspec.rb', line 13

def initialize
  @response = nil
end

Instance Attribute Details

#responseObject (readonly)

Given a Janus response



9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/rrj/janus/transactions/rspec.rb', line 9

class RSpec
  attr_reader :response

  # Initialize fake object
  def initialize
    @response = nil
  end

  # Fake method
  def connect; end

  # Fake method
  def detach; end

  # Fake method
  def detach_for_deleting; end

  # Publish fake message
  def publish_message(type, _options)
    @response = Janus::Responses::RSpec.new(type)
  end
end

Instance Method Details

#connectObject

Fake method



18
# File 'lib/rrj/janus/transactions/rspec.rb', line 18

def connect; end

#detachObject

Fake method



21
# File 'lib/rrj/janus/transactions/rspec.rb', line 21

def detach; end

#detach_for_deletingObject

Fake method



24
# File 'lib/rrj/janus/transactions/rspec.rb', line 24

def detach_for_deleting; end

#publish_message(type, _options) ⇒ Object

Publish fake message



27
28
29
# File 'lib/rrj/janus/transactions/rspec.rb', line 27

def publish_message(type, _options)
  @response = Janus::Responses::RSpec.new(type)
end