Module: ActiveSupport::Testing::Isolation
- Defined in:
- activesupport/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
14
15
16
|
# File 'activesupport/lib/active_support/testing/isolation.rb', line 14
def self.forking_env?
!ENV["NO_FORK"] && Process.respond_to?(:fork)
end
|
.included(klass) ⇒ Object
8
9
10
11
12
|
# File 'activesupport/lib/active_support/testing/isolation.rb', line 8
def self.included(klass) klass.class_eval do
parallelize_me!
end
end
|
Instance Method Details
18
19
20
21
22
23
24
|
# File 'activesupport/lib/active_support/testing/isolation.rb', line 18
def run
serialized = run_in_isolation do
super
end
Marshal.load(serialized)
end
|