projects
/
arvados.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6058d8a
)
5105: Restore previous token in an ensure block.
author
Tom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 15:17:25 +0000
(11:17 -0400)
committer
Tom Clegg <tom@curoverse.com>
Tue, 10 Mar 2015 15:17:25 +0000
(11:17 -0400)
apps/workbench/test/test_helper.rb
patch
|
blob
|
history
diff --git
a/apps/workbench/test/test_helper.rb
b/apps/workbench/test/test_helper.rb
index 695d01ad5b48c8e205ddbb10717e7d617ef45f6f..fdde55d41db63aced4559dc8d03409a58cc7246c 100644
(file)
--- a/
apps/workbench/test/test_helper.rb
+++ b/
apps/workbench/test/test_helper.rb
@@
-36,8
+36,11
@@
class ActiveSupport::TestCase
auth = api_fixture('api_client_authorizations')[token_name.to_s]
Thread.current[:arvados_api_token] = auth['api_token']
if block_given?
- yield
- Thread.current[:arvados_api_token] = was
+ begin
+ yield
+ ensure
+ Thread.current[:arvados_api_token] = was
+ end
end
end