Skip to content

Commit e77bcc3

Browse files
committed
Do not leak the integration test application
1 parent e277341 commit e77bcc3

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Diff for: test/helper.rb

+7-2
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,14 @@ def with_test_route_set(options = {})
7171
actions.each { |action| get action, controller: "#{controller_namespace}/test" }
7272
end
7373

74-
self.class.app = self.class.build_app(set, options)
74+
old_app = self.class.app
75+
begin
76+
self.class.app = self.class.build_app(set, options)
7577

76-
yield
78+
yield
79+
ensure
80+
self.class.app = old_app
81+
end
7782
end
7883
end
7984

0 commit comments

Comments
 (0)