-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Code cleanup + better docs for exceptions handling
- Loading branch information
Sergiusz Woźnicki
committed
Aug 26, 2014
1 parent
cca87ae
commit 5ebcd25
Showing
6 changed files
with
77 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,28 @@ | ||
require 'mangopay' | ||
require_relative 'mangopay/shared_resources' | ||
|
||
require 'fileutils' | ||
require 'pp' | ||
|
||
# (re-called once in configuration_spec) | ||
################################################################################ | ||
# mangopay test account config (re-called once in configuration_spec) | ||
def reset_mangopay_configuration | ||
MangoPay.configure do |c| | ||
c.preproduction = true | ||
c.client_id = 'sdk-unit-tests' | ||
c.client_passphrase = 'cqFfFrWfCcb7UadHNxx2C9Lo6Djw8ZduLi7J9USTmu8bhxxpju' | ||
c.temp_dir = File.expand_path('../tmp', __FILE__) | ||
require 'fileutils' | ||
FileUtils.mkdir_p(c.temp_dir) unless File.directory?(c.temp_dir) | ||
end | ||
end | ||
reset_mangopay_configuration | ||
|
||
|
||
################################################################################ | ||
# uncomment it for logging all http calls in tests | ||
#require 'http_logger' | ||
#require 'logger' | ||
#HttpLogger.logger = Logger.new(STDOUT) | ||
#HttpLogger.colorize = true | ||
#HttpLogger.log_headers = false | ||
#HttpLogger.log_request_body = true | ||
#HttpLogger.log_response_body = true |
fail and raise are aliases. Use raise when you are going to catch it again.