spec/spec_helper.rb in seymour-0.0.1 vs spec/spec_helper.rb in seymour-0.0.2

- old
+ new

@@ -1,20 +1,19 @@ +# Configure Rails Environment +ENV["RAILS_ENV"] ||= 'test' + +require File.expand_path("../dummy/config/environment.rb", __FILE__) +require 'rspec/rails' +require "rails/test_help" + dir = File.dirname(File.expand_path(__FILE__)) $LOAD_PATH.unshift dir + '/../lib' +$LOAD_PATH.unshift dir + '/support' require 'seymour' +require 'test_redis' RSpec.configure do |config| config.mock_with :rspec end -at_exit do - pid = `ps -A -o pid,command | grep [r]edis-spec`.split(" ")[0] - puts "Killing test redis server..." - `rm -f #{dir}/dump.rdb` - Process.kill("KILL", pid.to_i) - exit $!.status -end - -puts "Starting redis for testing at localhost:9736..." -`redis-server #{dir}/redis-spec.conf` -Seymour.redis = 'localhost:9736' +TestRedis::Server.start!(dir) \ No newline at end of file