File: spec_helper.rb

package info (click to toggle)
ruby-dotenv 2.4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 260 kB
  • sloc: ruby: 769; makefile: 6
file content (11 lines) | stat: -rw-r--r-- 294 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
require "dotenv"

RSpec.configure do |config|
  # Restore the state of ENV after each spec
  config.before { @env_keys = ENV.keys }
  config.after  { ENV.delete_if { |k, _v| !@env_keys.include?(k) } }
end

def fixture_path(name)
  File.join(File.expand_path("../fixtures", __FILE__), name)
end