Sha256: d406556e6e7fef9c31ac0575bc78422fe8e16233c89b940313f5bb512060214e
Contents?: true
Size: 1.91 KB
Versions: 3
Compression:
Stored size: 1.91 KB
Contents
#$LOAD_PATH << "." unless $LOAD_PATH.include? "." # moronic 1.9.2 breaks things bad require 'bundler' Bundler.setup Bundler.require :default, :test require 'yaml' require 'evented-spec' require 'evented-spec/adapters/adapter_seg' require 'amqp' begin require 'cool.io' rescue LoadError => e if RUBY_PLATFORM =~ /java/ puts "Cool.io is unavailable for jruby" else # cause unknown, reraise raise e end end # Done is defined as noop to help share examples between evented and non-evented specs def done end RSpec.configure do |c| c.filter_run_excluding :nojruby => true if RUBY_PLATFORM =~ /java/ c.filter_run_excluding :deliberately_failing => true if ENV["EXCLUDE_DELIBERATELY_FAILING_SPECS"] end amqp_config = File.dirname(__FILE__) + '/amqp.yml' AMQP_OPTS = unless File.exists? amqp_config {:user => 'guest', :pass => 'guest', :host => 'localhost', :vhost => '/'} else class Hash def symbolize_keys self.inject({}) { |result, (key, value)| new_key = case key when String then key.to_sym else key end new_value = case value when Hash then value.symbolize_keys else value end result[new_key] = new_value result } end end YAML::load_file(amqp_config).symbolize_keys[:test] end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
evented-spec-1.0.0.beta1 | spec/spec_helper.rb |
evented-spec-0.9.0 | spec/spec_helper.rb |
evented-spec-0.4.1 | spec/spec_helper.rb |