# This file was generated by the `rspec --init` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # Require this file using `require "spec_helper"` to ensure that it is only # loaded once. # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration require 'pause' require 'fileutils' if ENV['PAUSE_REAL_REDIS'] require 'pause/redis/adapter' puts ; puts "NOTE: Using real Redis-server at #{Pause::Redis::Adapter.redis.inspect}\n\n" else require 'fakeredis/rspec' end RSpec.configure do |config| config.run_all_when_everything_filtered = true config.filter_run :focus rspec_dir = './.spec'.freeze FileUtils.mkdir_p(rspec_dir) config.example_status_persistence_file_path = "#{rspec_dir}/results.txt" config.order = 'random' if ENV['PAUSE_REAL_REDIS'] config.before(:example) do Pause::Redis::Adapter.redis.flushdb end end end