Module: ActiveSupport::Testing::Isolation
- Defined in:
- lib/active_support/testing/isolation.rb
Defined Under Namespace
Modules: Forking, Subprocess
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.forking_env? ⇒ Boolean
12
13
14
|
# File 'lib/active_support/testing/isolation.rb', line 12
def self.forking_env?
!ENV["NO_FORK"] && Process.respond_to?(:fork)
end
|
.included(klass) ⇒ Object
6
7
8
9
10
|
# File 'lib/active_support/testing/isolation.rb', line 6
def self.included(klass) klass.class_eval do
parallelize_me!
end
end
|
Instance Method Details
16
17
18
19
20
21
22
|
# File 'lib/active_support/testing/isolation.rb', line 16
def run
serialized = run_in_isolation do
super
end
Marshal.load(serialized)
end
|