Sha256: e5b4c59fef24902aa4d96bbd76fdcd9e2aade079ea9be9e9cfd68647796d7943

Contents?: true

Size: 512 Bytes

Versions: 18

Compression:

Stored size: 512 Bytes

Contents

require File.dirname(__FILE__) + '/../lib/junkie'

require 'bundler/setup'
require 'rspec'
require 'eventmachine'
require 'fiber'
require 'webmock/rspec'

RSpec.configure do |config|
end

# Helper module that can be included into test cases
module EMHelper

  # wraps a given block in a EM event loop and a fiber
  #
  # @param [Block] block which is called inside an event loop and a fiber
  def em(&block)
    EM.run do
      Fiber.new do
        block.call

        EM.stop
      end.resume
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
junkie-0.1.3 spec/spec_helper.rb
junkie-0.1.2 spec/spec_helper.rb
junkie-0.1.1 spec/spec_helper.rb
junkie-0.1.0 spec/spec_helper.rb
junkie-0.0.15 spec/spec_helper.rb
junkie-0.0.14 spec/spec_helper.rb
junkie-0.0.13 spec/spec_helper.rb
junkie-0.0.12 spec/spec_helper.rb
junkie-0.0.11 spec/spec_helper.rb
junkie-0.0.10 spec/spec_helper.rb
junkie-0.0.9 spec/spec_helper.rb
junkie-0.0.8 spec/spec_helper.rb
junkie-0.0.7 spec/spec_helper.rb
junkie-0.0.6 spec/spec_helper.rb
junkie-0.0.5 spec/spec_helper.rb
junkie-0.0.4 spec/spec_helper.rb
junkie-0.0.3 spec/spec_helper.rb
junkie-0.0.2 spec/spec_helper.rb