Sha256: d0d1d0df13bdd592fa2544b2604fe2e6f848536efd31651168a585f4399717b6
Contents?: true
Size: 656 Bytes
Versions: 3
Compression:
Stored size: 656 Bytes
Contents
require File.dirname(__FILE__) + "/../spec_helper" describe Braintree::Subscription do context "price" do it "accepts price as either a String or a BigDecimal" do Braintree::Subscription.new(:price => "12.34", :transactions => []).price.should == BigDecimal.new("12.34") Braintree::Subscription.new(:price => BigDecimal.new("12.34"), :transactions => []).price.should == BigDecimal.new("12.34") end it "blows up if price is not a string or BigDecimal" do expect { Braintree::Subscription.new(:price => 12.34, :transactions => []) }.to raise_error(/Argument must be a String or BigDecimal/) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
braintree-1.1.3 | spec/unit/braintree/subscription_spec.rb |
braintree-1.1.2 | spec/unit/braintree/subscription_spec.rb |
braintree-1.1.1 | spec/unit/braintree/subscription_spec.rb |