Skip to content

Commit 2c0db17

Browse files
wintondeshongjondkinney
authored andcommitted
refined guard configuration; added puts in test setup for 'embedded signing' to display API errors; updated readme for with guard info
1 parent 8d19aca commit 2c0db17

File tree

6 files changed

+3924
-20
lines changed

6 files changed

+3924
-20
lines changed

Guardfile

+4-18
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,10 @@
1+
# -*- coding: utf-8 -*-
12
# A sample Guardfile
23
# More info at https://github.com/guard/guard#readme
34

45
guard 'minitest' do
5-
# with Minitest::Unit
66
watch(%r|^test/(.*)\/?test_(.*)\.rb|)
7-
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
8-
watch(%r|^test/test_helper\.rb|) { "test" }
9-
10-
# with Minitest::Spec
11-
# watch(%r|^spec/(.*)_spec\.rb|)
12-
# watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
13-
# watch(%r|^spec/spec_helper\.rb|) { "spec" }
14-
15-
# Rails 3.2
16-
# watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/controllers/#{m[1]}_test.rb" }
17-
# watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
18-
# watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
19-
20-
# Rails
21-
# watch(%r|^app/controllers/(.*)\.rb|) { |m| "test/functional/#{m[1]}_test.rb" }
22-
# watch(%r|^app/helpers/(.*)\.rb|) { |m| "test/helpers/#{m[1]}_test.rb" }
23-
# watch(%r|^app/models/(.*)\.rb|) { |m| "test/unit/#{m[1]}_test.rb" }
7+
watch(%r|^lib/(.*)([^/]+)\.rb|) { |m| "test/#{m[1]}test_#{m[2]}.rb" }
8+
watch(%r|^lib/docusign_rest/(.+)\.rb$|) { |m| "test/docusign_rest/#{m[1]}_test.rb" }
9+
watch(%r|^test/test_helper\.rb|) { "test" }
2410
end

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,22 @@ In order to run the tests you'll need to register for a (free) DocuSign develope
305305

306306
This calls a rake task which adds a non-version controlled file in the test folder called `docusign_login_config.rb` which holds your account specific credentials and is required in order to hit the test API through the test suite.
307307

308+
**Guard**
309+
310+
Simply run 'guard' from the root directory of the repository to have the test suite executed automatically as you make changes.
311+
308312
**VCR**
309313

310314
The test suite uses VCR and is configured to record all requests by using the 'all' configuration option surrounding each API request. If you want to speed up the test suite locally for new feature development, you may want to change the VCR config record setting to 'once' temporarily which will not write a new YAML file for each request each time you hit the API and significantly speed up the tests. However, this can lead to false passing tests as the gem changes so it's recommended that you ensure all tests pass by actually hitting the API before submitting a pull request.
315+
316+
**SSL Issue**
317+
318+
In the event that you have an SSL error running the tests, such as;
319+
320+
SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
321+
322+
there is a sample cert 'cacert.pem' you can use when executing the
323+
test suite.
324+
325+
SSL_CERT_FILE=cacert.pem guard
326+
SSL_CERT_FILE=cacert.pem ruby lib/tasks/docusign_task.rb

0 commit comments

Comments
 (0)