chargehound 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a8cdd2963d9a13ce6a5acc47fc2b87e3a7bdf243
4
+ data.tar.gz: 45cbe62923b0a463870ac45d8f8ed2020d0fe507
5
+ SHA512:
6
+ metadata.gz: c8f66046cf127db5a9c59d023c1c98c96ec9b76937505026d4ed5e7ef4dd4a0b9a92b28654626ecf4c846d2a1fe38465101199043dd965ec94409ed3fbdc978b
7
+ data.tar.gz: d950e221a03c6764ac41923f777bd16980632999dc1263e8580fa4e885e6a7b4980168b6b60ff85d9de379e801aa711ee4956d2480c44d44ea46aceffe3c1188
@@ -0,0 +1,5 @@
1
+ /Gemfile.lock
2
+ .rvmrc
3
+ .bundle
4
+ Gemfile.lock
5
+ vendor
@@ -0,0 +1,5 @@
1
+ Metrics/MethodLength:
2
+ Enabled: false
3
+
4
+ Style/SpecialGlobalVars:
5
+ Enabled: false
@@ -0,0 +1,14 @@
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1
7
+ - 2.2
8
+ - 2.3.0
9
+ - jruby-19mode
10
+ - jruby-9.0.5.0
11
+
12
+ sudo: false
13
+
14
+ script: bundle exec rake test
@@ -0,0 +1,2 @@
1
+ 1.0.0 April, 2016
2
+ - Initial release with disputes API
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in lob.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (C) 2016 Chargehound (https://www.chargehound.com)
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
@@ -0,0 +1,35 @@
1
+ # Chargehound ruby bindings
2
+
3
+ [![Build Status](https://travis-ci.org/chargehound/chargehound-ruby.svg?branch=master)](https://travis-ci.org/chargehound/chargehound-ruby)
4
+
5
+ <!-- ## Installation
6
+
7
+ `gem install chargehound` -->
8
+
9
+ ## Usage
10
+
11
+ Import chargehound and set your API key.
12
+
13
+ ```ruby
14
+ require 'chargehound'
15
+ Chargehound.api_key = '{ YOUR_API_KEY }'
16
+ ```
17
+
18
+ <!-- ## Resources
19
+
20
+ [Disputes](https://www.chargehound.com/docs/?ruby#disputes) -->
21
+
22
+ ## Development
23
+
24
+ To build and install from the latest source:
25
+
26
+ ```bash
27
+ $ git clone git@github.com:chargehound/chargehound-ruby.git
28
+ $ bundle install
29
+ ```
30
+
31
+ Run tests:
32
+
33
+ ```bash
34
+ $ bundle exec rake
35
+ ```
@@ -0,0 +1,12 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+ require 'rubocop/rake_task'
4
+
5
+ RuboCop::RakeTask.new
6
+
7
+ Rake::TestTask.new do |test|
8
+ test.libs.push 'lib', 'test'
9
+ test.pattern = './test/**/*_test.rb'
10
+ end
11
+
12
+ task default: [:rubocop, :test]
@@ -0,0 +1,29 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
+
3
+ require 'chargehound/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'chargehound'
7
+ spec.version = Chargehound::VERSION
8
+ spec.platform = Gem::Platform::RUBY
9
+ spec.required_ruby_version = '>= 1.9.3'
10
+ spec.authors = ['Chargehound']
11
+ spec.email = ['support@chargehound.com']
12
+ spec.homepage = 'https://www.chargehound.com'
13
+ spec.summary = 'Ruby bindings for the Chargehound API'
14
+ spec.description = 'Automatically fight disputes in Stripe'
15
+ spec.license = 'MIT'
16
+
17
+ spec.add_dependency 'typhoeus', '~> 1.0'
18
+
19
+ spec.add_development_dependency 'bundler', '~> 1.5'
20
+ spec.add_development_dependency 'minitest', '~> 5.8'
21
+ spec.add_development_dependency 'rake', '~> 11.1'
22
+ spec.add_development_dependency 'rubocop', '~> 0.39'
23
+ spec.add_development_dependency 'webmock', '~> 2.0'
24
+
25
+ spec.files = `git ls-files`.split($/)
26
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
27
+ spec.test_files = spec.files.grep(%r{^test/})
28
+ spec.require_paths = ['lib']
29
+ end
@@ -0,0 +1,18 @@
1
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), 'lib'))
2
+
3
+ # import Chargehound and set your API key
4
+ require 'chargehound'
5
+ Chargehound.api_key = ENV['CHARGEHOUND_API_KEY']
6
+
7
+ # List currently active disputes and then submit
8
+ # the most recent with the 'crowdfunding' template
9
+ # and update the `customer_ip` evidence field.
10
+ disputes = Chargehound::Disputes.list
11
+ first = disputes['data'][0]
12
+ submitted = Chargehound::Disputes.submit(first['id'],
13
+ template: 'crowdfunding',
14
+ fields: {
15
+ 'customer_ip' => '100'
16
+ })
17
+
18
+ puts "Submitted with fields: #{submitted['fields']}"
@@ -0,0 +1,13 @@
1
+ require 'chargehound/disputes'
2
+ require 'chargehound/error'
3
+
4
+ # Chargehound Ruby bindings
5
+ module Chargehound
6
+ @host = 'api.chargehound.com'
7
+ @base_path = '/v1/'
8
+ @api_key = ''
9
+
10
+ class << self
11
+ attr_accessor :api_key, :host, :base_path
12
+ end
13
+ end
@@ -0,0 +1,76 @@
1
+ require 'base64'
2
+ require 'chargehound/error'
3
+ require 'chargehound/version'
4
+ require 'json'
5
+ require 'typhoeus'
6
+
7
+ module Chargehound
8
+ # Send a request to the Chargehound API
9
+ class ApiRequest
10
+ def initialize(http_method, path, opts = {})
11
+ @request = build_request http_method, path, opts
12
+ end
13
+
14
+ def run
15
+ response = @request.run
16
+
17
+ body = parse_request_body response.body
18
+
19
+ unless response.success?
20
+ raise ChargehoundError.create_chargehound_error body
21
+ end
22
+
23
+ body
24
+ end
25
+
26
+ def build_headers(opts)
27
+ headers = {
28
+ 'Accept' => 'application/json',
29
+ 'Authorization' =>
30
+ "Basic #{Base64.encode64(Chargehound.api_key + ':').chomp}",
31
+ 'User-Agent' => "Chargehound/v1 RubyBindings/#{VERSION}"
32
+ }
33
+ opts[:body] && headers['Content-Type'] = 'application/json'
34
+ headers
35
+ end
36
+
37
+ def build_body(req_opts, http_method, opts)
38
+ if [:post, :patch, :put, :delete].include? http_method
39
+ req_body = build_request_body opts[:body]
40
+ req_opts.update body: req_body
41
+ end
42
+ end
43
+
44
+ def build_opts(http_method, opts)
45
+ query_params = opts[:query_params] || {}
46
+ headers = build_headers opts
47
+ req_opts = {
48
+ method: http_method,
49
+ headers: headers,
50
+ params: query_params
51
+ }
52
+ build_body req_opts, http_method, opts
53
+ req_opts
54
+ end
55
+
56
+ def build_request(http_method, path, opts = {})
57
+ url = build_request_url path
58
+ http_method = http_method.to_sym.downcase
59
+ req_opts = build_opts http_method, opts
60
+
61
+ Typhoeus::Request.new(url, req_opts)
62
+ end
63
+
64
+ def build_request_url(path)
65
+ 'https://' + Chargehound.host + Chargehound.base_path + path
66
+ end
67
+
68
+ def build_request_body(body)
69
+ body.to_json
70
+ end
71
+
72
+ def parse_request_body(body)
73
+ JSON.parse body
74
+ end
75
+ end
76
+ end
@@ -0,0 +1,69 @@
1
+ require 'chargehound/api_request'
2
+
3
+ module Chargehound
4
+ # Access the Chargehound dispute resource
5
+ class Disputes
6
+ # A list of disputes
7
+ # This endpoint will list all the disputes that we have synced from Stripe.
8
+ # By default the disputes will be ordered by `created` with the most recent
9
+ # dispute first. { }`has_more` will be `true` if more results are available.
10
+ # @option [Hash] params the optional parameters
11
+ # @option params [Float] :limit Maximum number of disputes to return.
12
+ # Default is 20, maximum is 100.
13
+ # @option params [String] :starting_after A dispute id.
14
+ # Fetch disputes created after this dispute.
15
+ # @option params [String] :ending_before A dispute id.
16
+ # Fetch disputes created before this dispute.
17
+ # @return [Disputes]
18
+ def self.list(params = {})
19
+ ApiRequest.new(:get, 'disputes', query_params: params).run
20
+ end
21
+
22
+ # Retrieve a dispute
23
+ # This endpoint will return a single dispute.
24
+ # @param dispute_id A dispute id
25
+ # @return [Dispute]
26
+ def self.retrieve(dispute_id)
27
+ ApiRequest.new(:get, "disputes/#{dispute_id}").run
28
+ end
29
+
30
+ # Submitting a dispute
31
+ # You will want to submit the dispute through Chargehound after you recieve
32
+ # a notification from Stripe of a new dispute. With one `POST` request
33
+ # you can update a dispute with the evidence fields and send the generated
34
+ # response to Stripe.
35
+ # The response will have a `201` status if the submit was successful.
36
+ # The dispute will also be in the submitted state.
37
+ # @param dispute_id A dispute id
38
+ # @option [Hash] update A dispute update object
39
+ # @option update [String] :template The id of the template to use.
40
+ # @option update [Object] :fields Key value pairs to hydrate the
41
+ # template's evidence fields.
42
+ # @option update [String] :customer_name Update the customer name.
43
+ # Will also update the customer name in the evidence fields.
44
+ # @option update [String] :customer_email Update the customer email.
45
+ # Will also update the customer email in the evidence fields.
46
+ # Must be a valid email address.
47
+ # @return [Dispute]
48
+ def self.submit(dispute_id, update = {})
49
+ ApiRequest.new(:post, "disputes/#{dispute_id}/submit", body: update).run
50
+ end
51
+
52
+ # Updating a dispute
53
+ # You can update the template and the fields on a dispute.
54
+ # @param dispute_id A dispute id
55
+ # @option [Hash] update A dispute update object
56
+ # @option update [String] :template The id of the template to use.
57
+ # @option update [Object] :fields Key value pairs to hydrate the template's
58
+ # evidence fields.
59
+ # @option update [String] :customer_name Update the customer name.
60
+ # Will also update the customer name in the evidence fields.
61
+ # @option update [String] :customer_email Update the customer email.
62
+ # Will also update the customer email in the evidence fields.
63
+ # Must be a valid email address.
64
+ # @return [Dispute]
65
+ def self.update(dispute_id, update = {})
66
+ ApiRequest.new(:put, "disputes/#{dispute_id}", body: update).run
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,30 @@
1
+ module Chargehound
2
+ # Cast Chargehound API errors to custom error types
3
+ class ChargehoundError < StandardError
4
+ attr_reader :status, :message
5
+
6
+ def initialize(error_response)
7
+ @message = error_response['message']
8
+ @status = error_response['status']
9
+ status_string = @status.nil? ? '' : "(Status #{@status}) "
10
+ super("#{status_string}#{message}")
11
+ end
12
+
13
+ def self.create_chargehound_error(error_response)
14
+ error = error_response['error']
15
+ case error['status']
16
+ when 401
17
+ ChargehoundAuthenticationError.new(error)
18
+ when 403
19
+ ChargehoundAuthenticationError.new(error)
20
+ when 400
21
+ ChargehoundBadRequestError.new(error)
22
+ else
23
+ ChargehoundError.new(error)
24
+ end
25
+ end
26
+ end
27
+
28
+ class ChargehoundAuthenticationError < ChargehoundError; end
29
+ class ChargehoundBadRequestError < ChargehoundError; end
30
+ end
@@ -0,0 +1,3 @@
1
+ module Chargehound
2
+ VERSION = '1.0.0'.freeze
3
+ end
@@ -0,0 +1,34 @@
1
+ require 'test_helper'
2
+
3
+ original_host = Chargehound.host
4
+
5
+ auth_header = {
6
+ 'Authorization' => 'Basic QVBJX0tFWTo='
7
+ }
8
+
9
+ describe Chargehound do
10
+ after do
11
+ Chargehound.api_key = ''
12
+ Chargehound.host = original_host
13
+ WebMock.reset!
14
+ end
15
+
16
+ it 'can set the API key on the module' do
17
+ Chargehound.api_key = 'API_KEY'
18
+ stub = stub_request(:get, 'https://api.chargehound.com/v1/disputes')
19
+ .with(headers: auth_header)
20
+ .to_return(body: {}.to_json)
21
+
22
+ Chargehound::Disputes.list
23
+ assert_requested stub
24
+ end
25
+
26
+ it 'can set the base host on the module' do
27
+ Chargehound.host = 'test'
28
+ stub = stub_request(:get, 'https://test/v1/disputes')
29
+ .to_return(body: {}.to_json)
30
+
31
+ Chargehound::Disputes.list
32
+ assert_requested stub
33
+ end
34
+ end
@@ -0,0 +1,70 @@
1
+ require 'test_helper'
2
+
3
+ get_headers = {
4
+ 'Accept' => 'application/json',
5
+ 'Authorization' => 'Basic QVBJX0tFWTo=',
6
+ 'User-Agent' => 'Chargehound/v1 RubyBindings/1.0.0'
7
+ }
8
+
9
+ post_headers = {
10
+ 'Accept' => 'application/json',
11
+ 'Authorization' => 'Basic QVBJX0tFWTo=',
12
+ 'Content-Type' => 'application/json',
13
+ 'User-Agent' => 'Chargehound/v1 RubyBindings/1.0.0'
14
+ }
15
+
16
+ dispute_update = {
17
+ fields: {
18
+ 'customer_name' => 'Susie'
19
+ }
20
+ }
21
+
22
+ dispute_response = {
23
+ 'id' => 'dp_123'
24
+ }.to_json
25
+
26
+ describe Chargehound::Disputes do
27
+ before do
28
+ Chargehound.api_key = 'API_KEY'
29
+ end
30
+
31
+ after do
32
+ WebMock.reset!
33
+ end
34
+
35
+ it 'can list disputes' do
36
+ stub = stub_request(:get, 'https://api.chargehound.com/v1/disputes')
37
+ .with(headers: get_headers)
38
+ .to_return(body: dispute_response)
39
+
40
+ Chargehound::Disputes.list
41
+ assert_requested stub
42
+ end
43
+
44
+ it 'can retrieve a dispute' do
45
+ stub = stub_request(:get, 'https://api.chargehound.com/v1/disputes/dp_123')
46
+ .with(headers: get_headers)
47
+ .to_return(body: dispute_response)
48
+
49
+ Chargehound::Disputes.retrieve('dp_123')
50
+ assert_requested stub
51
+ end
52
+
53
+ it 'can submit a dispute' do
54
+ stub = stub_request(:post, 'https://api.chargehound.com/v1/disputes/dp_123/submit')
55
+ .with(headers: post_headers, body: dispute_update.to_json)
56
+ .to_return(body: dispute_response)
57
+
58
+ Chargehound::Disputes.submit('dp_123', dispute_update)
59
+ assert_requested stub
60
+ end
61
+
62
+ it 'can update a dispute' do
63
+ stub = stub_request(:put, 'https://api.chargehound.com/v1/disputes/dp_123')
64
+ .with(headers: post_headers, body: dispute_update.to_json)
65
+ .to_return(body: dispute_response)
66
+
67
+ Chargehound::Disputes.update('dp_123', dispute_update)
68
+ assert_requested stub
69
+ end
70
+ end
@@ -0,0 +1,40 @@
1
+ require 'test_helper'
2
+
3
+ error_response = {
4
+ 'error' => {
5
+ 'status' => 400,
6
+ 'message' => 'Bad Request'
7
+ }
8
+ }
9
+
10
+ describe Chargehound::ChargehoundError do
11
+ before do
12
+ Chargehound.api_key = 'API_KEY'
13
+ end
14
+
15
+ after do
16
+ WebMock.reset!
17
+ end
18
+
19
+ it 'should propagate errors' do
20
+ stub_request(:any, 'https://api.chargehound.com/v1/disputes').to_raise(StandardError)
21
+
22
+ assert_raises(StandardError, proc { Chargehound::Disputes.list })
23
+ end
24
+
25
+ it 'should return typed chargehound errors from the API' do
26
+ stub_request(:any, 'https://api.chargehound.com/v1/disputes')
27
+ .to_return(status: 400, body: error_response.to_json)
28
+
29
+ # `assert_raises` doesn't like Chargehound::ChargehoundBadRequestError,
30
+ # so we simply write the code
31
+ begin
32
+ Chargehound::Disputes.list
33
+ rescue Chargehound::ChargehoundBadRequestError => error
34
+ assert(error.is_a?(Chargehound::ChargehoundBadRequestError))
35
+ assert_equal(400, error.status)
36
+ assert_equal('Bad Request', error.message)
37
+ assert_equal('(Status 400) Bad Request', error.to_s)
38
+ end
39
+ end
40
+ end
@@ -0,0 +1,5 @@
1
+ require 'chargehound'
2
+ require 'minitest/spec'
3
+ require 'minitest/pride'
4
+ require 'minitest/autorun'
5
+ require 'webmock/minitest'
metadata ADDED
@@ -0,0 +1,151 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: chargehound
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Chargehound
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2016-04-28 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: typhoeus
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.5'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '1.5'
41
+ - !ruby/object:Gem::Dependency
42
+ name: minitest
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '5.8'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '5.8'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '11.1'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ version: '11.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '0.39'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '0.39'
83
+ - !ruby/object:Gem::Dependency
84
+ name: webmock
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ~>
88
+ - !ruby/object:Gem::Version
89
+ version: '2.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ~>
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
97
+ description: Automatically fight disputes in Stripe
98
+ email:
99
+ - support@chargehound.com
100
+ executables: []
101
+ extensions: []
102
+ extra_rdoc_files: []
103
+ files:
104
+ - .gitignore
105
+ - .rubocop.yml
106
+ - .travis.yml
107
+ - CHANGELOG
108
+ - Gemfile
109
+ - LICENSE
110
+ - README.md
111
+ - Rakefile
112
+ - chargehound.gemspec
113
+ - example/submit_dispute.rb
114
+ - lib/chargehound.rb
115
+ - lib/chargehound/api_request.rb
116
+ - lib/chargehound/disputes.rb
117
+ - lib/chargehound/error.rb
118
+ - lib/chargehound/version.rb
119
+ - test/chargehound_test.rb
120
+ - test/disputes_test.rb
121
+ - test/error_test.rb
122
+ - test/test_helper.rb
123
+ homepage: https://www.chargehound.com
124
+ licenses:
125
+ - MIT
126
+ metadata: {}
127
+ post_install_message:
128
+ rdoc_options: []
129
+ require_paths:
130
+ - lib
131
+ required_ruby_version: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - '>='
134
+ - !ruby/object:Gem::Version
135
+ version: 1.9.3
136
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
+ requirements:
138
+ - - '>='
139
+ - !ruby/object:Gem::Version
140
+ version: '0'
141
+ requirements: []
142
+ rubyforge_project:
143
+ rubygems_version: 2.0.14
144
+ signing_key:
145
+ specification_version: 4
146
+ summary: Ruby bindings for the Chargehound API
147
+ test_files:
148
+ - test/chargehound_test.rb
149
+ - test/disputes_test.rb
150
+ - test/error_test.rb
151
+ - test/test_helper.rb