Sha256: 950405727f381a66f7ebc2eabc4dccf557be40ad798e9d9fb1232d9d1bded69d
Contents?: true
Size: 953 Bytes
Versions: 3
Compression:
Stored size: 953 Bytes
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 'amqp-spec/rspec' require 'shared_examples' def rspec2? defined?(RSpec) end RSPEC = rspec2? ? RSpec : Spec amqp_config = File.dirname(__FILE__) + '/amqp.yml' if File.exists? amqp_config 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 AMQP_OPTS = YAML::load_file(amqp_config).symbolize_keys[:test] end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
amqp-spec-0.2.7 | spec/spec_helper.rb |
amqp-spec-0.2.6 | spec/spec_helper.rb |
amqp-spec-0.2.5 | spec/spec_helper.rb |