fake_braintree 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -4,3 +4,6 @@ Gemfile.lock
4
4
  pkg/*
5
5
  tmp/
6
6
  tags
7
+
8
+ # bundle install --binstubs=bundler_binstubs
9
+ bundler_binstubs
@@ -1,4 +1,7 @@
1
- # 0.1.0 (not yet released)
1
+ # 0.1.1
2
+ * Braintree::CreditCard.update now works
3
+
4
+ # 0.1.0
2
5
  * FakeBraintree.{customers, transactions, failures, subscriptions, redirects}
3
6
  are now accessed via FakeBraintree.registry. For example,
4
7
  FakeBraintree.customers is now FakeBraintree.registry.customers
data/README.md CHANGED
@@ -25,6 +25,7 @@ Currently in alpha (i.e. it does not support every Braintree call).
25
25
  ### CreditCard
26
26
  * `Braintree::CreditCard.find`
27
27
  * `Braintree::CreditCard.sale`
28
+ * `Braintree::CreditCard.update`
28
29
 
29
30
  ### Transaction
30
31
  * `Braintree::Transaction.sale`
@@ -43,7 +44,7 @@ do before each test.
43
44
 
44
45
  Full example:
45
46
 
46
- # spec_helper.rb
47
+ # spec/spec_helper.rb
47
48
  require 'fake_braintree'
48
49
 
49
50
  RSpec.configure do |c|
@@ -54,7 +55,7 @@ Full example:
54
55
 
55
56
  If you're using Cucumber, add this too:
56
57
 
57
- # env.rb
58
+ # features/support/env.rb
58
59
  require 'fake_braintree'
59
60
 
60
61
  Before do
@@ -6,6 +6,7 @@ require 'fake_braintree/helpers'
6
6
  require 'fake_braintree/customer'
7
7
  require 'fake_braintree/subscription'
8
8
  require 'fake_braintree/redirect'
9
+ require 'fake_braintree/credit_card'
9
10
 
10
11
  require 'fake_braintree/registry'
11
12
  require 'fake_braintree/server'
@@ -0,0 +1,78 @@
1
+ module FakeBraintree
2
+ class CreditCard
3
+ include Helpers
4
+
5
+ def initialize(credit_card_hash_from_params, options)
6
+ set_up_credit_card(credit_card_hash_from_params, options)
7
+ set_expiration_month_and_year
8
+ end
9
+
10
+ def update
11
+ if credit_card_exists_in_registry?
12
+ update_credit_card!
13
+ response_for_updated_card
14
+ else
15
+ response_for_card_not_found
16
+ end
17
+ end
18
+
19
+ private
20
+
21
+ def update_credit_card!
22
+ @hash = credit_card_from_registry.merge!(@hash)
23
+ end
24
+
25
+ def response_for_updated_card
26
+ gzipped_response(200, @hash.to_xml(:root => 'credit_card'))
27
+ end
28
+
29
+ def credit_card_exists_in_registry?
30
+ FakeBraintree.registry.credit_cards.key?(token)
31
+ end
32
+
33
+ def credit_card_from_registry
34
+ FakeBraintree.registry.credit_cards[token]
35
+ end
36
+
37
+ def response_for_card_not_found
38
+ gzipped_response(404, FakeBraintree.failure_response.to_xml(:root => 'api_error_response'))
39
+ end
40
+
41
+ def expiration_month
42
+ expiration_date_parts[0]
43
+ end
44
+
45
+ def expiration_year
46
+ expiration_date_parts[1]
47
+ end
48
+
49
+ def set_up_credit_card(credit_card_hash_from_params, options)
50
+ @hash = {
51
+ "token" => options[:token],
52
+ "merchant_id" => options[:merchant_id]
53
+ }.merge(credit_card_hash_from_params)
54
+ end
55
+
56
+ def set_expiration_month_and_year
57
+ if expiration_month
58
+ @hash["expiration_month"] = expiration_month
59
+ end
60
+
61
+ if expiration_year
62
+ @hash["expiration_year"] = expiration_year
63
+ end
64
+ end
65
+
66
+ def token
67
+ @hash['token']
68
+ end
69
+
70
+ def expiration_date_parts
71
+ if @hash.key?("expiration_date")
72
+ @hash["expiration_date"].split('/')
73
+ else
74
+ []
75
+ end
76
+ end
77
+ end
78
+ end
@@ -14,8 +14,9 @@ module FakeBraintree
14
14
  failure_response
15
15
  else
16
16
  hash = customer_hash
17
- FakeBraintree.registry.customers[hash["id"]] = hash
18
- gzipped_response(201, hash.to_xml(:root => 'customer'))
17
+ create_customer_with(hash)
18
+ create_credit_card_with(hash)
19
+ creation_response_for(hash)
19
20
  end
20
21
  end
21
22
 
@@ -121,5 +122,25 @@ module FakeBraintree
121
122
  def existing_customer_id
122
123
  @customer_hash['id']
123
124
  end
125
+
126
+ def creation_response_for(hash)
127
+ gzipped_response(201, hash.to_xml(:root => 'customer'))
128
+ end
129
+
130
+ def create_customer_with(hash)
131
+ FakeBraintree.registry.customers[hash["id"]] = hash
132
+ end
133
+
134
+ def create_credit_card_with(hash)
135
+ if hash.key?("credit_cards")
136
+ hash["credit_cards"].each do |credit_card|
137
+ add_credit_card_to_registry(credit_card)
138
+ end
139
+ end
140
+ end
141
+
142
+ def add_credit_card_to_registry(credit_card_hash)
143
+ FakeBraintree.registry.credit_cards[credit_card_hash["token"]] = credit_card_hash
144
+ end
124
145
  end
125
146
  end
@@ -3,7 +3,12 @@ class FakeBraintree::Registry
3
3
  clear!
4
4
  end
5
5
 
6
- attr_accessor :customers, :subscriptions, :failures, :transactions, :redirects
6
+ attr_accessor :customers,
7
+ :subscriptions,
8
+ :failures,
9
+ :transactions,
10
+ :redirects,
11
+ :credit_cards
7
12
 
8
13
  def clear!
9
14
  @customers = {}
@@ -11,18 +16,10 @@ class FakeBraintree::Registry
11
16
  @failures = {}
12
17
  @transactions = {}
13
18
  @redirects = {}
19
+ @credit_cards = {}
14
20
  end
15
21
 
16
22
  def failure?(card_number)
17
23
  @failures.keys.include?(card_number)
18
24
  end
19
-
20
- def credit_card_from_token(token)
21
- @customers.values.detect do |customer|
22
- next unless customer.key?("credit_cards")
23
-
24
- card = customer["credit_cards"].detect {|card| card["token"] == token }
25
- return card if card
26
- end
27
- end
28
25
  end
@@ -66,7 +66,6 @@ module FakeBraintree
66
66
 
67
67
  # Braintree::Subscription.cancel
68
68
  put "/merchants/:merchant_id/subscriptions/:id/cancel" do
69
- subscription = FakeBraintree.registry.subscriptions[params[:id]]
70
69
  updates = {"status" => Braintree::Subscription::Status::Canceled}
71
70
  options = {:id => params[:id], :merchant_id => params[:merchant_id]}
72
71
  Subscription.new(updates, options).update
@@ -74,10 +73,18 @@ module FakeBraintree
74
73
 
75
74
  # Braintree::CreditCard.find
76
75
  get "/merchants/:merchant_id/payment_methods/:credit_card_token" do
77
- credit_card = FakeBraintree.registry.credit_card_from_token(params[:credit_card_token])
76
+ credit_card = FakeBraintree.registry.credit_cards[params[:credit_card_token]]
78
77
  gzipped_response(200, credit_card.to_xml(:root => "credit_card"))
79
78
  end
80
79
 
80
+ # Braintree::CreditCard.update
81
+ put "/merchants/:merchant_id/payment_methods/:credit_card_token" do
82
+ credit_card = FakeBraintree.registry.credit_cards[params[:credit_card_token]]
83
+ updates = Hash.from_xml(request.body).delete("credit_card")
84
+ options = {:token => params[:credit_card_token], :merchant_id => params[:merchant_id]}
85
+ CreditCard.new(updates, options).update
86
+ end
87
+
81
88
  # Braintree::Transaction.sale
82
89
  # Braintree::CreditCard.sale
83
90
  post "/merchants/:merchant_id/transactions" do
@@ -4,6 +4,6 @@ module FakeBraintree
4
4
  4012000077777777 4012888888881881
5
5
  4217651111111119 4500600000000061
6
6
  5555555555554444 378282246310005
7
- 371449635398431 6011111111111117
7
+ 371449635398431 6011111111111117
8
8
  3530111333300000)
9
9
  end
@@ -1,3 +1,3 @@
1
1
  module FakeBraintree
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
@@ -21,3 +21,18 @@ describe "Braintree::CreditCard.sale" do
21
21
  Braintree::Transaction.find(result.transaction.id).should be
22
22
  end
23
23
  end
24
+
25
+ describe "Braintree::CreditCard.update" do
26
+ it "successfully updates the credit card" do
27
+ new_expiration_date = "08/2012"
28
+ token = cc_token
29
+
30
+ result = Braintree::CreditCard.update(token, :expiration_date => new_expiration_date)
31
+ result.should be_success
32
+ Braintree::CreditCard.find(token).expiration_date.should == new_expiration_date
33
+ end
34
+
35
+ it "raises an error for a nonexistent credit card" do
36
+ lambda { Braintree::CreditCard.update("foo", {:number => TEST_CC_NUMBER}) }.should raise_error(Braintree::NotFoundError)
37
+ end
38
+ end
@@ -9,6 +9,22 @@ describe "Braintree::Customer.create" do
9
9
  result.should be_success
10
10
  end
11
11
 
12
+ it "associates a created credit card with the customer" do
13
+ result = Braintree::Customer.create(:credit_card => { :number => TEST_CC_NUMBER,
14
+ :expiration_date => '04/2016'})
15
+ credit_cards = Braintree::Customer.find(result.customer.id).credit_cards
16
+ credit_cards.size.should == 1
17
+ credit_cards.first.expiration_date.should == "04/2016"
18
+ end
19
+
20
+ it "successfully creates the customer's credit card" do
21
+ result = Braintree::Customer.create(:credit_card => { :number => TEST_CC_NUMBER,
22
+ :expiration_date => '04/2016'})
23
+
24
+ cc_token = result.customer.credit_cards.first.token
25
+ expect { Braintree::CreditCard.find(cc_token) }.not_to raise_error(Braintree::NotFoundError)
26
+ end
27
+
12
28
  it "can handle an empty credit card hash" do
13
29
  result = Braintree::Customer.create(:credit_card => {})
14
30
  result.should be_success
@@ -1,66 +1,21 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe FakeBraintree::Registry do
4
- it "exposes a customers accessor" do
5
- registry.customers['abc123'] = "Bob"
6
- registry.customers['abc123'].should == "Bob"
7
- end
8
-
9
- it "exposes a subscriptions accessor" do
10
- registry.subscriptions['abc123'] = "Bob"
11
- registry.subscriptions['abc123'].should == "Bob"
12
- end
13
-
14
- it "exposes a failures accessor" do
15
- registry.failures['abc123'] = "Bob"
16
- registry.failures['abc123'].should == "Bob"
17
- end
18
-
19
- it "exposes a transactions accessor" do
20
- registry.transactions['abc123'] = "Bob"
21
- registry.transactions['abc123'].should == "Bob"
22
- end
23
-
24
- it "exposes a redirects accessor" do
25
- registry.redirects['abc123'] = "Bob"
26
- registry.redirects['abc123'].should == "Bob"
27
- end
28
-
29
- let(:registry) { subject }
4
+ it { should have_hash_accessor_for(:customers) }
5
+ it { should have_hash_accessor_for(:subscriptions) }
6
+ it { should have_hash_accessor_for(:failures) }
7
+ it { should have_hash_accessor_for(:transactions) }
8
+ it { should have_hash_accessor_for(:redirects) }
9
+ it { should have_hash_accessor_for(:credit_cards) }
30
10
  end
31
11
 
32
12
  describe FakeBraintree::Registry, "#clear!" do
33
- it "clears stored customers" do
34
- registry.customers['abc123'] = "Bob"
35
- registry.clear!
36
- registry.customers.should be_empty
37
- end
38
-
39
- it "clears stored subscriptions" do
40
- registry.subscriptions['abc123'] = "Bob"
41
- registry.clear!
42
- registry.subscriptions.should be_empty
43
- end
44
-
45
- it "clears stored failures" do
46
- registry.failures['abc123'] = "Bob"
47
- registry.clear!
48
- registry.failures.should be_empty
49
- end
50
-
51
- it "clears stored transactions" do
52
- registry.transactions['abc123'] = "Bob"
53
- registry.clear!
54
- registry.transactions.should be_empty
55
- end
56
-
57
- it "clears stored redirects" do
58
- registry.redirects['abc123'] = "Bob"
59
- registry.clear!
60
- registry.redirects.should be_empty
61
- end
62
-
63
- let(:registry) { subject }
13
+ it { should clear_hash_when_cleared(:customers) }
14
+ it { should clear_hash_when_cleared(:subscriptions) }
15
+ it { should clear_hash_when_cleared(:failures) }
16
+ it { should clear_hash_when_cleared(:transactions) }
17
+ it { should clear_hash_when_cleared(:redirects) }
18
+ it { should clear_hash_when_cleared(:credit_cards) }
64
19
  end
65
20
 
66
21
  describe FakeBraintree::Registry, "#failure?" do
@@ -73,22 +28,5 @@ describe FakeBraintree::Registry, "#failure?" do
73
28
  registry.failure?('abc123').should be_true
74
29
  end
75
30
 
76
-
77
31
  let(:registry) { subject }
78
32
  end
79
-
80
- describe FakeBraintree::Registry, ".credit_card_from_token" do
81
- it "looks up the credit card based on a CC token" do
82
- number = %w(4111 1111 1111 2222).join
83
- expiration_date = "04/2016"
84
- customer = create_braintree_customer(number, expiration_date)
85
- credit_card = customer.credit_cards.first
86
-
87
- # registry.customers[customer.id] = customer
88
-
89
- registry.credit_card_from_token(credit_card.token)["last_4"].should == "2222"
90
- end
91
-
92
- # let(:registry) { FakeBraintree::Registry.new }
93
- let(:registry) { FakeBraintree.registry }
94
- end
@@ -0,0 +1,11 @@
1
+ RSpec::Matchers.define :clear_hash_when_cleared do |property|
2
+ match do |object|
3
+ object.send(property.to_sym)["key"] = "value"
4
+ object.clear!
5
+ object.send(property.to_sym).should be_empty
6
+ end
7
+
8
+ failure_message do
9
+ "Expected #{object} to clear #{property} hash after clear!, but it did not."
10
+ end
11
+ end
@@ -0,0 +1,10 @@
1
+ RSpec::Matchers.define :have_hash_accessor_for do |property|
2
+ match do |object|
3
+ object.send(property.to_sym)['key'] = 'value'
4
+ object.send(property.to_sym)['key'].should == 'value'
5
+ end
6
+
7
+ failure_message do
8
+ "Expected #{object} to have accessor for #{property}, but it did not."
9
+ end
10
+ end
metadata CHANGED
@@ -1,216 +1,156 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fake_braintree
3
- version: !ruby/object:Gem::Version
4
- hash: 27
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 0
10
- version: 0.1.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - thoughtbot, inc.
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2012-01-11 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- requirement: *id001
31
- type: :runtime
32
- prerelease: false
12
+ date: 2012-01-12 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
33
15
  name: capybara
34
- - !ruby/object:Gem::Dependency
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
16
+ requirement: &70333736724140 !ruby/object:Gem::Requirement
36
17
  none: false
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
44
- requirement: *id002
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
45
22
  type: :runtime
46
23
  prerelease: false
24
+ version_requirements: *70333736724140
25
+ - !ruby/object:Gem::Dependency
47
26
  name: activesupport
48
- - !ruby/object:Gem::Dependency
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
27
+ requirement: &70333736722000 !ruby/object:Gem::Requirement
50
28
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- requirement: *id003
29
+ requirements:
30
+ - - ! '>='
31
+ - !ruby/object:Gem::Version
32
+ version: '0'
59
33
  type: :runtime
60
34
  prerelease: false
35
+ version_requirements: *70333736722000
36
+ - !ruby/object:Gem::Dependency
61
37
  name: i18n
62
- - !ruby/object:Gem::Dependency
63
- version_requirements: &id004 !ruby/object:Gem::Requirement
38
+ requirement: &70333736716440 !ruby/object:Gem::Requirement
64
39
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- requirement: *id004
40
+ requirements:
41
+ - - ! '>='
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
73
44
  type: :runtime
74
45
  prerelease: false
46
+ version_requirements: *70333736716440
47
+ - !ruby/object:Gem::Dependency
75
48
  name: sinatra
76
- - !ruby/object:Gem::Dependency
77
- version_requirements: &id005 !ruby/object:Gem::Requirement
49
+ requirement: &70333736728540 !ruby/object:Gem::Requirement
78
50
  none: false
79
- requirements:
80
- - - ~>
81
- - !ruby/object:Gem::Version
82
- hash: 9
83
- segments:
84
- - 2
85
- - 5
86
- version: "2.5"
87
- requirement: *id005
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
88
55
  type: :runtime
89
56
  prerelease: false
57
+ version_requirements: *70333736728540
58
+ - !ruby/object:Gem::Dependency
90
59
  name: braintree
91
- - !ruby/object:Gem::Dependency
92
- version_requirements: &id006 !ruby/object:Gem::Requirement
60
+ requirement: &70333736727580 !ruby/object:Gem::Requirement
93
61
  none: false
94
- requirements:
62
+ requirements:
95
63
  - - ~>
96
- - !ruby/object:Gem::Version
97
- hash: 961915972
98
- segments:
99
- - 1
100
- - 2
101
- - 0
102
- - pre
103
- version: 1.2.0.pre
104
- requirement: *id006
64
+ - !ruby/object:Gem::Version
65
+ version: '2.5'
105
66
  type: :runtime
106
67
  prerelease: false
68
+ version_requirements: *70333736727580
69
+ - !ruby/object:Gem::Dependency
107
70
  name: mongrel
108
- - !ruby/object:Gem::Dependency
109
- version_requirements: &id007 !ruby/object:Gem::Requirement
71
+ requirement: &70333736726360 !ruby/object:Gem::Requirement
110
72
  none: false
111
- requirements:
73
+ requirements:
112
74
  - - ~>
113
- - !ruby/object:Gem::Version
114
- hash: 23
115
- segments:
116
- - 2
117
- - 6
118
- - 0
119
- version: 2.6.0
120
- requirement: *id007
121
- type: :development
75
+ - !ruby/object:Gem::Version
76
+ version: 1.2.0.pre
77
+ type: :runtime
122
78
  prerelease: false
79
+ version_requirements: *70333736726360
80
+ - !ruby/object:Gem::Dependency
123
81
  name: rspec
124
- - !ruby/object:Gem::Dependency
125
- version_requirements: &id008 !ruby/object:Gem::Requirement
82
+ requirement: &70333736724400 !ruby/object:Gem::Requirement
126
83
  none: false
127
- requirements:
84
+ requirements:
128
85
  - - ~>
129
- - !ruby/object:Gem::Version
130
- hash: 15
131
- segments:
132
- - 1
133
- - 0
134
- version: "1.0"
135
- requirement: *id008
86
+ - !ruby/object:Gem::Version
87
+ version: 2.6.0
136
88
  type: :development
137
89
  prerelease: false
90
+ version_requirements: *70333736724400
91
+ - !ruby/object:Gem::Dependency
138
92
  name: bourne
139
- - !ruby/object:Gem::Dependency
140
- version_requirements: &id009 !ruby/object:Gem::Requirement
93
+ requirement: &70333736739180 !ruby/object:Gem::Requirement
141
94
  none: false
142
- requirements:
95
+ requirements:
143
96
  - - ~>
144
- - !ruby/object:Gem::Version
145
- hash: 25
146
- segments:
147
- - 0
148
- - 3
149
- - 5
150
- version: 0.3.5
151
- requirement: *id009
97
+ - !ruby/object:Gem::Version
98
+ version: '1.0'
152
99
  type: :development
153
100
  prerelease: false
101
+ version_requirements: *70333736739180
102
+ - !ruby/object:Gem::Dependency
154
103
  name: timecop
155
- - !ruby/object:Gem::Dependency
156
- version_requirements: &id010 !ruby/object:Gem::Requirement
104
+ requirement: &70333736737640 !ruby/object:Gem::Requirement
157
105
  none: false
158
- requirements:
106
+ requirements:
159
107
  - - ~>
160
- - !ruby/object:Gem::Version
161
- hash: 15424151
162
- segments:
163
- - 0
164
- - 9
165
- - 0
166
- - rc
167
- - 9
168
- version: 0.9.0.rc9
169
- requirement: *id010
108
+ - !ruby/object:Gem::Version
109
+ version: 0.3.5
170
110
  type: :development
171
111
  prerelease: false
112
+ version_requirements: *70333736737640
113
+ - !ruby/object:Gem::Dependency
172
114
  name: spork
173
- - !ruby/object:Gem::Dependency
174
- version_requirements: &id011 !ruby/object:Gem::Requirement
115
+ requirement: &70333736736180 !ruby/object:Gem::Requirement
175
116
  none: false
176
- requirements:
177
- - - ">="
178
- - !ruby/object:Gem::Version
179
- hash: 11
180
- segments:
181
- - 1
182
- - 0
183
- - 14
184
- version: 1.0.14
185
- requirement: *id011
117
+ requirements:
118
+ - - ~>
119
+ - !ruby/object:Gem::Version
120
+ version: 0.9.0.rc9
186
121
  type: :development
187
122
  prerelease: false
123
+ version_requirements: *70333736736180
124
+ - !ruby/object:Gem::Dependency
188
125
  name: bundler
189
- - !ruby/object:Gem::Dependency
190
- version_requirements: &id012 !ruby/object:Gem::Requirement
126
+ requirement: &70333736734420 !ruby/object:Gem::Requirement
191
127
  none: false
192
- requirements:
193
- - - ">="
194
- - !ruby/object:Gem::Version
195
- hash: 3
196
- segments:
197
- - 0
198
- version: "0"
199
- requirement: *id012
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: 1.0.14
200
132
  type: :development
201
133
  prerelease: false
134
+ version_requirements: *70333736734420
135
+ - !ruby/object:Gem::Dependency
202
136
  name: rake
137
+ requirement: &70333736778120 !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ type: :development
144
+ prerelease: false
145
+ version_requirements: *70333736778120
203
146
  description: A fake Braintree that you can run integration tests against
204
- email:
147
+ email:
205
148
  - gabe@thoughtbot.com
206
149
  - ben@thoughtbot.com
207
150
  executables: []
208
-
209
151
  extensions: []
210
-
211
152
  extra_rdoc_files: []
212
-
213
- files:
153
+ files:
214
154
  - .gitignore
215
155
  - .travis.yml
216
156
  - Changelog.md
@@ -219,6 +159,7 @@ files:
219
159
  - Rakefile
220
160
  - fake_braintree.gemspec
221
161
  - lib/fake_braintree.rb
162
+ - lib/fake_braintree/credit_card.rb
222
163
  - lib/fake_braintree/customer.rb
223
164
  - lib/fake_braintree/helpers.rb
224
165
  - lib/fake_braintree/redirect.rb
@@ -238,41 +179,40 @@ files:
238
179
  - spec/spec_helper.rb
239
180
  - spec/support/braintree_helpers.rb
240
181
  - spec/support/customer_helpers.rb
182
+ - spec/support/matchers/clear_hash_when_cleared.rb
183
+ - spec/support/matchers/have_accessor_for.rb
241
184
  - spec/support/subscription_helpers.rb
242
- homepage: ""
185
+ homepage: ''
243
186
  licenses: []
244
-
245
187
  post_install_message:
246
188
  rdoc_options: []
247
-
248
- require_paths:
189
+ require_paths:
249
190
  - lib
250
- required_ruby_version: !ruby/object:Gem::Requirement
191
+ required_ruby_version: !ruby/object:Gem::Requirement
251
192
  none: false
252
- requirements:
253
- - - ">="
254
- - !ruby/object:Gem::Version
255
- hash: 3
256
- segments:
193
+ requirements:
194
+ - - ! '>='
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
197
+ segments:
257
198
  - 0
258
- version: "0"
259
- required_rubygems_version: !ruby/object:Gem::Requirement
199
+ hash: 2066919718453722382
200
+ required_rubygems_version: !ruby/object:Gem::Requirement
260
201
  none: false
261
- requirements:
262
- - - ">="
263
- - !ruby/object:Gem::Version
264
- hash: 3
265
- segments:
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: '0'
206
+ segments:
266
207
  - 0
267
- version: "0"
208
+ hash: 2066919718453722382
268
209
  requirements: []
269
-
270
210
  rubyforge_project:
271
211
  rubygems_version: 1.8.11
272
212
  signing_key:
273
213
  specification_version: 3
274
214
  summary: A fake Braintree that you can run integration tests against
275
- test_files:
215
+ test_files:
276
216
  - spec/fake_braintree/credit_card_spec.rb
277
217
  - spec/fake_braintree/customer_spec.rb
278
218
  - spec/fake_braintree/registry_spec.rb
@@ -283,4 +223,6 @@ test_files:
283
223
  - spec/spec_helper.rb
284
224
  - spec/support/braintree_helpers.rb
285
225
  - spec/support/customer_helpers.rb
226
+ - spec/support/matchers/clear_hash_when_cleared.rb
227
+ - spec/support/matchers/have_accessor_for.rb
286
228
  - spec/support/subscription_helpers.rb