diff options
author | mguetlein <martin.guetlein@gmail.com> | 2013-09-05 16:08:09 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2013-09-05 16:08:09 +0200 |
commit | a0a8742a6f6cf4094ab5111db5da24dd6e941547 (patch) | |
tree | 8838dfe89dc502d70f8d2ebb786b6ef761b6b3e8 | |
parent | 7e2a6be5444371a18ba5f7505b4069c5b11932fe (diff) |
make sure to print error-cause in tests if available
-rw-r--r-- | test/setup.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/setup.rb b/test/setup.rb index 8ed0d2a..5d29c3c 100644 --- a/test/setup.rb +++ b/test/setup.rb @@ -11,3 +11,15 @@ unless $aa[:uri].to_s == "" OpenTox::Authorization.authenticate($aa[:user], $aa[:password]) unauthorized_error "Failed to authenticate user \"#{$aa[:user]}\"." unless OpenTox::Authorization.is_token_valid end + +class OpenTox::Error + def to_s + s = super.to_s + if error_cause + s << "\nerror-cause:\n" + s << error_cause + s << "\n" + end + s + end +end |