File: within_temp_dir.rb

package info (click to toggle)
ruby-rspec-temp-dir 1.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 128 kB
  • sloc: ruby: 97; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 179 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
require "rspec"

RSpec.shared_context "within temp dir" do
  include_context "uses temp dir"

  around do |example|
    Dir.chdir(temp_dir) do
      example.run
    end
  end
end