Sha256: 05733a428e07ef0f0d2d1dbb56295ea7f84748cb3fb29e8b3833fa858c6fa56e

Contents?: true

Size: 443 Bytes

Versions: 1

Compression:

Stored size: 443 Bytes

Contents

module QCHelper

  def enqueue_stub
    proc do |method, *args| 
      klass = eval(method.split(".").first)
      msg = method.split(".").last
      klass.send(msg, *args)
    end 
  end

  def setup
    init_db
  end

  def teardown
    QC.delete_all
  end

  def init_db(table_name="queue_classic_jobs")
    QC::Conn.execute("SET client_min_messages TO 'warning'")
    QC::Setup.drop
    QC::Setup.create
    QC::Conn.disconnect
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
qc-mailer-0.0.3 test/support/qc_helper.rb