Module: Fluffle::Testing::Connectable

Defined in:
lib/fluffle/testing.rb

Overview

Patch in a new #connect method that injects the loopback

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



21
22
23
24
25
26
27
28
29
# File 'lib/fluffle/testing.rb', line 21

def self.included(klass)
  klass.class_eval do
    alias_method :original_connect, :connect

    def connect(*args)
      @connection = Loopback.instance.connection
    end
  end
end