spec/spec_helper.rb in amq-protocol-0.0.1.pre vs spec/spec_helper.rb in amq-protocol-0.5.0
- old
+ new
@@ -1,8 +1,31 @@
# encoding: binary
-require "rspec"
-require_relative "../lib/amq/protocol.rb"
+require 'bundler/setup'
+require 'rspec'
+begin
+ require 'simplecov'
+
+ SimpleCov.start do
+ add_filter '/spec/'
+ end
+rescue LoadError
+end
+
+$: << File.expand_path('../../lib', __FILE__)
+
+require "amq/protocol"
+
+module RubyVersionsSUpport
+ def one_point_eight?
+ RUBY_VERSION =~ /^1.8/
+ end
+end # RubyVersionsSUpport
+
+
RSpec.configure do |config|
config.include AMQ::Protocol
+
+ config.include(RubyVersionsSUpport)
+ config.extend(RubyVersionsSUpport)
end