Permalink
Browse files

Allow for calling Braintree::Customer.create with no params

This is legal but fake_braintree chokes on it
  • Loading branch information...
1 parent 2fe003f commit c3b55ecdd35fcfec90b5402da63b935eed44625d @wonnage wonnage committed with gabebw Jul 30, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 lib/fake_braintree/customer.rb
@@ -6,7 +6,10 @@ def initialize(customer_hash_from_params, options)
@customer_hash = {
"id" => options[:id],
"merchant_id" => options[:merchant_id]
- }.merge(customer_hash_from_params)
+ }
+ if customer_hash_from_params.is_a?(Hash)
+ @customer_hash.merge!(customer_hash_from_params)
+ end
set_customer_id
end

0 comments on commit c3b55ec

Please sign in to comment.