spec/spec_helper.rb in redis-objects-1.5.1 vs spec/spec_helper.rb in redis-objects-1.6.0

- old
+ new

@@ -7,10 +7,25 @@ Bacon.summary_at_exit if $0 =~ /\brspec$/ raise "\n===\nThese tests are in bacon, not rspec. Try: bacon #{ARGV * ' '}\n===\n" end +# For the incompatible change from redis.rb +Redis.exists_returns_integer = true + +# Avoid phantom remote test failures +RUNNING_LOCALLY = !ENV['TRAVIS'] + +# Code coverage reports +require 'simplecov' +SimpleCov.start + +require 'simplecov-cobertura' +SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter + +#require "active_support/xml_mini" +require "active_support" require "active_support/testing/time_helpers" include ActiveSupport::Testing::TimeHelpers REDIS_CLASS_NAMES = [:Counter, :HashKey, :List, :Lock, :Set, :SortedSet, :Value] @@ -67,11 +82,9 @@ e.should.be.is_a?(StandardError) end # Grab a global handle REDIS_HANDLE = Redis.new(:host => REDIS_HOST, :port => REDIS_PORT) -#$redis = REDIS_HANDLE -Redis.current = REDIS_HANDLE SORT_ORDER = {:order => 'desc alpha'} SORT_LIMIT = {:limit => [2, 2]} SORT_BY = {:by => 'm_*'} SORT_GET = {:get => 'spec/*/sorted'}.merge!(SORT_LIMIT)