File: within_temp_dir.rb

package info (click to toggle)
ruby-rspec-temp-dir 1.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 148 kB
  • sloc: ruby: 97; makefile: 4
file content (11 lines) | stat: -rw-r--r-- 179 bytes parent folder | download | duplicates (2)
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