diff options
Diffstat (limited to 'test/setup.rb')
-rw-r--r-- | test/setup.rb | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/test/setup.rb b/test/setup.rb index 3521645..9d9bc64 100644 --- a/test/setup.rb +++ b/test/setup.rb @@ -4,22 +4,7 @@ Bundler.require require 'opentox-client' require File.join(ENV["HOME"],".opentox","config","test.rb") +include OpenTox TEST_DIR ||= File.expand_path(File.dirname(__FILE__)) DATA_DIR ||= File.join(TEST_DIR,"data") - -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" - error_cause.is_a?(String) ? s << error_cause : s << JSON.pretty_generate(error_cause) - s << "\n" - end - s - end -end +$mongo.database.drop |