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

Add in_sub_process_where_possible #178

Merged
merged 1 commit into from
Feb 10, 2015
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
7 changes: 6 additions & 1 deletion lib/rspec/support/spec/in_sub_process.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,18 @@ def in_sub_process(prevent_warnings=true)

raise exception if exception
end
# rubocop:enable MethodLength
alias :in_sub_process_if_possible :in_sub_process
else
def in_sub_process(*)
skip "This spec requires forking to work properly, " \
"and your platform does not support forking"
end

def in_sub_process_if_possible(*)
yield
end
end
# rubocop:enable MethodLength
end
end
end