Sha256: cf6eacc7f5747dee5f4a3b5eddcb4bab079c3a114a7c8fd62370ca0a1cc214f4

Contents?: true

Size: 732 Bytes

Versions: 11

Compression:

Stored size: 732 Bytes

Contents

require File.dirname(__FILE__) + "/../lib/babylon"

# #
# Deactivate the logging
Babylon.logger.level = Log4r::FATAL

Babylon.environment = "test"

if !defined? BabylonSpecHelper
  module BabylonSpecHelper
    ##
    # Load configuration from a local config file
    def babylon_config
      @config ||= YAML.load(File.read(File.join(File.dirname(__FILE__), "config.yaml")))
    end

    ##
    # Mock for Handler
    def handler_mock
      @handler_mock ||= 
      begin
        mock(Object, { :on_connected => Proc.new { |conn|
          },
        :on_disconnected => Proc.new {
          # Disconnected
          },
        :on_stanza => Proc.new { |stanza|
          # Stanza!
          }
        })
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 2 rubygems

Version Path
julien51-babylon-0.1.10 spec/spec_helper.rb
julien51-babylon-0.1.11 spec/spec_helper.rb
julien51-babylon-0.1.2 spec/spec_helper.rb
julien51-babylon-0.1.3 spec/spec_helper.rb
julien51-babylon-0.1.4 spec/spec_helper.rb
julien51-babylon-0.1.5 spec/spec_helper.rb
julien51-babylon-0.1.6 spec/spec_helper.rb
julien51-babylon-0.1.7 spec/spec_helper.rb
julien51-babylon-0.1.8 spec/spec_helper.rb
julien51-babylon-0.1.9 spec/spec_helper.rb
mohiam-babylon-0.1.7 spec/spec_helper.rb