Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Include the shared context the new way. #283

Merged
merged 1 commit into from
Jun 5, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/rspec/support/spec/with_isolated_directory.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
require 'tmpdir'

RSpec.shared_context "isolated directory", :isolated_directory => true do
RSpec.shared_context "isolated directory" do
around do |ex|
Dir.mktmpdir do |tmp_dir|
Dir.chdir(tmp_dir, &ex)
end
end
end

RSpec.configure do |c|
c.include_context "isolated directory", :isolated_directory => true
end