File: spec_helper.rb

package info (click to toggle)
ruby-rollout 2.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 176 kB
  • sloc: ruby: 1,166; makefile: 4
file content (23 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

require 'fakeredis'
require 'redis'
require 'rollout'

Redis.current = Redis.new(
  host: ENV.fetch('REDIS_HOST', '127.0.0.1'),
  port: ENV.fetch('REDIS_PORT', '6379'),
  db: ENV.fetch('REDIS_DB', '7'),
)

RSpec.configure do |config|
  config.example_status_persistence_file_path = '.rspec_status'

  # config.disable_monkey_patching!

  config.expect_with :rspec do |c|
    c.syntax = :expect
  end

  config.before { Redis.current.flushdb }
end